Skip to content

Commit f0c9a9f

Browse files
committed
Don't clone in UnificationTable::probe().
This speeds up compilation of rustc-benchmarks/inflate-0.1.0 by 1%.
1 parent 89386d6 commit f0c9a9f

File tree

1 file changed

+1
-1
lines changed
  • src/librustc_data_structures/unify

1 file changed

+1
-1
lines changed

src/librustc_data_structures/unify/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ impl<'tcx, K, V> UnificationTable<K>
344344
}
345345

346346
pub fn probe(&mut self, a_id: K) -> Option<V> {
347-
self.get(a_id).value.clone()
347+
self.get(a_id).value
348348
}
349349

350350
pub fn unsolved_variables(&mut self) -> Vec<K> {

0 commit comments

Comments
 (0)