about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2016-11-18 10:10:09 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2016-11-18 14:26:22 +1100
commitf0c9a9f4749c8db719d2913c3c7619665db1c0c2 (patch)
tree1f9cdc9ecfb3528259165176c0bff03d278ff3f9
parent89386d62ab2ae38771b48a64a72ff73f954c4564 (diff)
downloadrust-f0c9a9f4749c8db719d2913c3c7619665db1c0c2.tar.gz
rust-f0c9a9f4749c8db719d2913c3c7619665db1c0c2.zip
Don't clone in UnificationTable::probe().
This speeds up compilation of rustc-benchmarks/inflate-0.1.0 by 1%.
-rw-r--r--src/librustc_data_structures/unify/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_data_structures/unify/mod.rs b/src/librustc_data_structures/unify/mod.rs
index 1f4d09a9224..e2d3a4f4537 100644
--- a/src/librustc_data_structures/unify/mod.rs
+++ b/src/librustc_data_structures/unify/mod.rs
@@ -344,7 +344,7 @@ impl<'tcx, K, V> UnificationTable<K>
     }
 
     pub fn probe(&mut self, a_id: K) -> Option<V> {
-        self.get(a_id).value.clone()
+        self.get(a_id).value
     }
 
     pub fn unsolved_variables(&mut self) -> Vec<K> {