diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-04-21 23:25:18 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-04-23 10:03:43 -0700 |
| commit | 823c7eee6a040862abb5a5309693030394200e62 (patch) | |
| tree | 348049a75e563b2fe9e9478dea3927578accbb9c /src/libstd/option.rs | |
| parent | b4ecbe93401a56181baaffc4ff7e275aeecc5182 (diff) | |
Fix other bugs with new closure borrowing
This fixes various issues throughout the standard distribution and tests.
Diffstat (limited to 'src/libstd/option.rs')
| -rw-r--r-- | src/libstd/option.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/option.rs b/src/libstd/option.rs index 557e2043381..efbb1abacfa 100644 --- a/src/libstd/option.rs +++ b/src/libstd/option.rs @@ -873,9 +873,9 @@ mod tests { assert_eq!(v, None); // test that it does not take more elements than it needs - let functions = [|| Some(()), || None, || fail!()]; + let mut functions = [|| Some(()), || None, || fail!()]; - let v: Option<~[()]> = collect(functions.iter().map(|f| (*f)())); + let v: Option<~[()]> = collect(functions.mut_iter().map(|f| (*f)())); assert_eq!(v, None); } |
