docs: Simplify a tutorial example
This commit is contained in:
parent
28c45601b2
commit
95d9c8699c
@ -1558,7 +1558,7 @@ access local variables in the enclosing scope.
|
||||
|
||||
~~~~
|
||||
let mut max = 0;
|
||||
(~[1, 2, 3]).map(|x| if *x > max { max = *x });
|
||||
[1, 2, 3].map(|x| if *x > max { max = *x });
|
||||
~~~~
|
||||
|
||||
Stack closures are very efficient because their environment is
|
||||
|
Loading…
Reference in New Issue
Block a user