Skip to content

Commit 99433f0

Browse files
Rollup merge of rust-lang#37848 - nnethercote:UnificationTable-probe, r=arielb1
Don't clone in UnificationTable::probe(). This speeds up compilation of rustc-benchmarks/inflate-0.1.0 by 1%.
2 parents e8d38be + f0c9a9f commit 99433f0

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

Lines changed: 1 addition & 1 deletion
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)