let mut vector = Vec::new();
let mut closure = || vector.push(1);
closure();
struct Environment<'v> {
v: &'v mut Vec<i32>
}
impl<'v> FnMut() for Environment<'v> {
fn call_mut(&mut self) {
self.v.push(1)
}
}
let mut vector = Vec::new();
let mut closure = Environment{v: &vector};
closure();