Fix unit test that was illegally mutating an upvar
This commit is contained in:
parent
f74b1c4ee2
commit
16b27bbead
1 changed files with 2 additions and 2 deletions
|
|
@ -28,8 +28,8 @@ fn main() {
|
|||
let mut x = 0u;
|
||||
let y = 2u;
|
||||
|
||||
call_fn(|&:| x += y);
|
||||
call_fn(|&:| assert_eq!(x, 0));
|
||||
call_fn_mut(|&mut:| x += y);
|
||||
call_fn_once(|:| x += y);
|
||||
assert_eq!(x, y * 3);
|
||||
assert_eq!(x, y * 2);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue