diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-11-20 14:17:12 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-11-26 08:23:57 -0800 |
| commit | 1eca34de7dd55719cd83153994e5caf2027f62a2 (patch) | |
| tree | 14ba2903a9ead6e569d08a33c9ebfc2c6ba07e9e /src/libstd/local_data.rs | |
| parent | 6801bc8f552ce740deb60212903ba43de197689c (diff) | |
libstd: Remove all non-`proc` uses of `do` from libstd
Diffstat (limited to 'src/libstd/local_data.rs')
| -rw-r--r-- | src/libstd/local_data.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/local_data.rs b/src/libstd/local_data.rs index 083de15008a..89907c7434c 100644 --- a/src/libstd/local_data.rs +++ b/src/libstd/local_data.rs @@ -189,7 +189,7 @@ pub fn get<T: 'static, U>(key: Key<T>, f: |Option<&T>| -> U) -> U { /// on loan via this or the `get` methods. This is similar to how it's a runtime /// error to take two mutable loans on an `@mut` box. pub fn get_mut<T: 'static, U>(key: Key<T>, f: |Option<&mut T>| -> U) -> U { - do get_with(key, MutLoan) |x| { + get_with(key, MutLoan, |x| { match x { None => f(None), // We're violating a lot of compiler guarantees with this @@ -199,7 +199,7 @@ pub fn get_mut<T: 'static, U>(key: Key<T>, f: |Option<&mut T>| -> U) -> U { // there is no need to be upset! Some(x) => { f(Some(unsafe { cast::transmute_mut(x) })) } } - } + }) } fn get_with<T:'static, |
