remove "#" symbols to make the code compile
This commit is contained in:
parent
073a09fd63
commit
f91649144e
@ -492,12 +492,12 @@ fn factory() -> Box<Fn(i32) -> i32> {
|
|||||||
|
|
||||||
Box::new(move |x| x + num)
|
Box::new(move |x| x + num)
|
||||||
}
|
}
|
||||||
# fn main() {
|
fn main() {
|
||||||
let f = factory();
|
let f = factory();
|
||||||
|
|
||||||
let answer = f(1);
|
let answer = f(1);
|
||||||
assert_eq!(6, answer);
|
assert_eq!(6, answer);
|
||||||
# }
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
By making the inner closure a `move Fn`, we create a new stack frame for our
|
By making the inner closure a `move Fn`, we create a new stack frame for our
|
||||||
|
Loading…
Reference in New Issue
Block a user