diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-09-28 00:22:18 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-09-28 00:22:28 -0700 |
| commit | bc9efaad9c978f71bd7ac2c91efbc957e25d43fb (patch) | |
| tree | 5a966292079cbd3cbe120e939da824f119fd61a8 /src/libstd/smallintmap.rs | |
| parent | 467f2abdd8b676aed94364f09c8334b6627bd5b0 (diff) | |
| download | rust-bc9efaad9c978f71bd7ac2c91efbc957e25d43fb.tar.gz rust-bc9efaad9c978f71bd7ac2c91efbc957e25d43fb.zip | |
std: Eliminate deprecated patterns
Diffstat (limited to 'src/libstd/smallintmap.rs')
| -rw-r--r-- | src/libstd/smallintmap.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libstd/smallintmap.rs b/src/libstd/smallintmap.rs index 5fc8ead59fd..e3927ef188c 100644 --- a/src/libstd/smallintmap.rs +++ b/src/libstd/smallintmap.rs @@ -3,7 +3,6 @@ * are O(highest integer key). */ #[forbid(deprecated_mode)]; -#[forbid(deprecated_pattern)]; use core::option; use core::option::{Some, None}; @@ -56,7 +55,7 @@ pure fn get<T: Copy>(self: SmallIntMap<T>, key: uint) -> T { error!("smallintmap::get(): key not present"); fail; } - Some(v) => return v + Some(move v) => return v } } @@ -117,7 +116,7 @@ impl<V: Copy> SmallIntMap<V>: map::Map<uint, V> { let mut idx = 0u, l = self.v.len(); while idx < l { match self.v.get_elt(idx) { - Some(elt) => if !it(&idx, &elt) { break }, + Some(ref elt) => if !it(&idx, elt) { break }, None => () } idx += 1u; |
