diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-06-17 19:43:22 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-06-21 03:20:22 -0400 |
| commit | 49c74524e2c5a2a81ce4cbe2c50a507c0be9f24e (patch) | |
| tree | 441c718864c414bd4f7750c2435edc100e4a1841 /src/libstd/task | |
| parent | cbad1da3db7eda0911e988fb6255ac5c16961aa7 (diff) | |
| download | rust-49c74524e2c5a2a81ce4cbe2c50a507c0be9f24e.tar.gz rust-49c74524e2c5a2a81ce4cbe2c50a507c0be9f24e.zip | |
vec: rm old_iter implementations, except BaseIter
The removed test for issue #2611 is well covered by the `std::iterator` module itself. This adds the `count` method to `IteratorUtil` to replace `EqIter`.
Diffstat (limited to 'src/libstd/task')
| -rw-r--r-- | src/libstd/task/local_data_priv.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/task/local_data_priv.rs b/src/libstd/task/local_data_priv.rs index f6b14a51539..0956b76c970 100644 --- a/src/libstd/task/local_data_priv.rs +++ b/src/libstd/task/local_data_priv.rs @@ -142,7 +142,7 @@ unsafe fn local_data_lookup<T: 'static>( -> Option<(uint, *libc::c_void)> { let key_value = key_to_key_value(key); - let map_pos = (*map).position(|entry| + let map_pos = (*map).iter().position_(|entry| match *entry { Some((k,_,_)) => k == key_value, None => false @@ -215,7 +215,7 @@ pub unsafe fn local_set<T: 'static>( } None => { // Find an empty slot. If not, grow the vector. - match (*map).position(|x| x.is_none()) { + match (*map).iter().position_(|x| x.is_none()) { Some(empty_index) => { map[empty_index] = new_entry; } None => { map.push(new_entry); } } |
