From f0c9a9f4749c8db719d2913c3c7619665db1c0c2 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Fri, 18 Nov 2016 10:10:09 +1100 Subject: [PATCH] Don't clone in UnificationTable::probe(). This speeds up compilation of rustc-benchmarks/inflate-0.1.0 by 1%. --- src/librustc_data_structures/unify/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_data_structures/unify/mod.rs b/src/librustc_data_structures/unify/mod.rs index 1f4d09a92247e..e2d3a4f453749 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 } pub fn probe(&mut self, a_id: K) -> Option { - self.get(a_id).value.clone() + self.get(a_id).value } pub fn unsolved_variables(&mut self) -> Vec {