mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-16 14:07:04 +00:00
remove redundant clones (clippy::redundant_clone)
This commit is contained in:
parent
c34c015fe2
commit
6e852cc4ce
@ -1317,7 +1317,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
||||
T: TypeFoldable<'tcx>,
|
||||
{
|
||||
if !value.needs_infer() {
|
||||
return value.clone(); // Avoid duplicated subst-folding.
|
||||
return value; // Avoid duplicated subst-folding.
|
||||
}
|
||||
let mut r = resolve::OpportunisticVarResolver::new(self);
|
||||
value.fold_with(&mut r)
|
||||
|
@ -328,8 +328,8 @@ struct SplitIntRange {
|
||||
}
|
||||
|
||||
impl SplitIntRange {
|
||||
fn new(r: IntRange) -> Self {
|
||||
SplitIntRange { range: r.clone(), borders: Vec::new() }
|
||||
fn new(range: IntRange) -> Self {
|
||||
SplitIntRange { range, borders: Vec::new() }
|
||||
}
|
||||
|
||||
/// Internal use
|
||||
|
Loading…
Reference in New Issue
Block a user