]> git.lizzy.rs Git - rust.git/commitdiff
Fix another occurrence of #22243
authorMarkus Unterwaditzer <markus@unterwaditzer.net>
Sun, 22 Feb 2015 16:13:41 +0000 (17:13 +0100)
committerMarkus Unterwaditzer <markus@unterwaditzer.net>
Sun, 22 Feb 2015 16:13:41 +0000 (17:13 +0100)
src/librustc/util/common.rs

index a3cc23b7bba839d9ee2ed0ffdd705e11ba1ce1cc..ca740f53782192de205ca915ea630785cd62bc1d 100644 (file)
@@ -212,7 +212,7 @@ pub fn memoized<T, U, S, F>(cache: &RefCell<HashMap<T, U, S>>, arg: T, f: F) ->
           F: FnOnce(T) -> U,
 {
     let key = arg.clone();
-    let result = cache.borrow().get(&key).map(|result| result.clone());
+    let result = cache.borrow().get(&key).cloned();
     match result {
         Some(result) => result,
         None => {