Skip to content

Commit

Permalink
remove "#" symbols to make the code compile
Browse files Browse the repository at this point in the history
  • Loading branch information
kindlychung committed Apr 14, 2016
1 parent 073a09f commit f916491
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doc/book/closures.md
Expand Up @@ -492,12 +492,12 @@ 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
Expand Down

0 comments on commit f916491

Please sign in to comment.