rust: Fix borrowck error