Skip to content

Commit

Permalink
Don't clone in UnificationTable::probe().
Browse files Browse the repository at this point in the history
This speeds up compilation of rustc-benchmarks/inflate-0.1.0 by 1%.
  • Loading branch information
nnethercote committed Nov 18, 2016
1 parent 89386d6 commit f0c9a9f
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 f0c9a9f

Please sign in to comment.