diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-11-20 15:00:04 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-20 15:00:04 +0100 |
| commit | 99433f0bfe6e8528e1035f5d49cc126b5c989149 (patch) | |
| tree | f9972c0305032fd244ed972500de22972bdccb77 | |
| parent | e8d38beddfb4f0368b081bd215300d79e9a0b7b4 (diff) | |
| parent | f0c9a9f4749c8db719d2913c3c7619665db1c0c2 (diff) | |
| download | rust-99433f0bfe6e8528e1035f5d49cc126b5c989149.tar.gz rust-99433f0bfe6e8528e1035f5d49cc126b5c989149.zip | |
Rollup merge of #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%.
| -rw-r--r-- | src/librustc_data_structures/unify/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_data_structures/unify/mod.rs b/src/librustc_data_structures/unify/mod.rs index 1f4d09a9224..e2d3a4f4537 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<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> { |
