Commented out final 'main' function in order to fit within pattern of other examples and prevent incorrect indentation

This commit is contained in:
Bunts Thy Unholy 2016-10-31 22:45:03 +11:00
parent 4497196ba5
commit 32fb2527d9

View file

@ -510,6 +510,7 @@ fn factory() -> Box<Fn(i32) -> i32> {
Box::new(|x| x + num)
}
# fn main() {
let f = factory();
@ -540,12 +541,13 @@ fn factory() -> Box<Fn(i32) -> i32> {
Box::new(move |x| x + num)
}
fn main() {
# fn main() {
let f = factory();
let answer = f(1);
assert_eq!(6, answer);
}
# }
```
By making the inner closure a `move Fn`, we create a new stack frame for our