Skip to content

Commit ea0014c

Browse files
committed
Remove some redundant clones
1 parent 6a2a0b7 commit ea0014c

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

crates/hir_ty/src/infer/closure.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,7 @@ impl InferenceContext<'_> {
7575
safety: chalk_ir::Safety::Safe,
7676
variadic: false,
7777
},
78-
substitution: FnSubst(Substitution::from_iter(
79-
&Interner,
80-
sig_tys.clone(),
81-
)),
78+
substitution: FnSubst(Substitution::from_iter(&Interner, sig_tys)),
8279
});
8380
}
8481
}

crates/rust-analyzer/src/main_loop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ impl GlobalState {
636636
let mut text = String::from_utf8(vfs.file_contents(file_id).to_vec()).unwrap();
637637
apply_document_changes(&mut text, params.content_changes);
638638

639-
vfs.set_file_contents(path.clone(), Some(text.into_bytes()));
639+
vfs.set_file_contents(path, Some(text.into_bytes()));
640640
}
641641
Ok(())
642642
})?

0 commit comments

Comments
 (0)