The borrowing the closure does doesn't change the type of the captured variable. count
is of type i32
inside and outside the closure; the &mut i32
is only part of how the compiler implements access to count
inside the closure.
The borrowing the closure does doesn't change the type of the captured variable. count
is of type i32
inside and outside the closure; the &mut i32
is only part of how the compiler implements access to count
inside the closure.