You can just return `v` instead of `&v`.

(The test failures are because `v` is defined inside the closure, and so returning a reference would be creating a dangling pointer.)