remove redundant clones in librustc_mir_build and librustc_data_structures
This commit is contained in:
parent
79cd224e75
commit
5ae4500eff
@ -314,7 +314,7 @@ impl<O: ForestObligation> ObligationForest<O> {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
match self.active_cache.entry(obligation.as_cache_key().clone()) {
|
||||
match self.active_cache.entry(obligation.as_cache_key()) {
|
||||
Entry::Occupied(o) => {
|
||||
let node = &mut self.nodes[*o.get()];
|
||||
if let Some(parent_index) = parent {
|
||||
@ -385,7 +385,7 @@ impl<O: ForestObligation> ObligationForest<O> {
|
||||
self.error_cache
|
||||
.entry(node.obligation_tree_id)
|
||||
.or_default()
|
||||
.insert(node.obligation.as_cache_key().clone());
|
||||
.insert(node.obligation.as_cache_key());
|
||||
}
|
||||
|
||||
/// Performs a pass through the obligation list. This must
|
||||
|
@ -649,7 +649,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||
}
|
||||
}
|
||||
PatKind::Or { ref pats } => {
|
||||
self.visit_bindings(&pats[0], pattern_user_ty.clone(), f);
|
||||
self.visit_bindings(&pats[0], pattern_user_ty, f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user