Skip to content

Commit

Permalink
Rollup merge of rust-lang#37848 - nnethercote:UnificationTable-probe,…
Browse files Browse the repository at this point in the history
… r=arielb1

Don't clone in UnificationTable::probe().

This speeds up compilation of rustc-benchmarks/inflate-0.1.0 by 1%.
  • Loading branch information
GuillaumeGomez authored Nov 20, 2016
2 parents e8d38be + f0c9a9f commit 99433f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_data_structures/unify/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down

0 comments on commit 99433f0

Please sign in to comment.