Rollup merge of #80348 - matthiaskrgr:less_clones, r=Dylan-DPC
remove redundant clones (clippy::redundant_clone)
This commit is contained in:
commit
a309468a8c
2 changed files with 3 additions and 3 deletions
|
@ -1317,7 +1317,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
||||||
T: TypeFoldable<'tcx>,
|
T: TypeFoldable<'tcx>,
|
||||||
{
|
{
|
||||||
if !value.needs_infer() {
|
if !value.needs_infer() {
|
||||||
return value.clone(); // Avoid duplicated subst-folding.
|
return value; // Avoid duplicated subst-folding.
|
||||||
}
|
}
|
||||||
let mut r = resolve::OpportunisticVarResolver::new(self);
|
let mut r = resolve::OpportunisticVarResolver::new(self);
|
||||||
value.fold_with(&mut r)
|
value.fold_with(&mut r)
|
||||||
|
|
|
@ -328,8 +328,8 @@ struct SplitIntRange {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SplitIntRange {
|
impl SplitIntRange {
|
||||||
fn new(r: IntRange) -> Self {
|
fn new(range: IntRange) -> Self {
|
||||||
SplitIntRange { range: r.clone(), borders: Vec::new() }
|
SplitIntRange { range, borders: Vec::new() }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Internal use
|
/// Internal use
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue