mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-28 20:16:58 +03:00
Remove some redundant clones
This commit is contained in:
@@ -75,10 +75,7 @@ fn deduce_sig_from_dyn_ty(&self, dyn_ty: &DynTy) -> Option<FnPointer> {
|
||||
safety: chalk_ir::Safety::Safe,
|
||||
variadic: false,
|
||||
},
|
||||
substitution: FnSubst(Substitution::from_iter(
|
||||
&Interner,
|
||||
sig_tys.clone(),
|
||||
)),
|
||||
substitution: FnSubst(Substitution::from_iter(&Interner, sig_tys)),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -636,7 +636,7 @@ fn on_notification(&mut self, not: Notification) -> Result<()> {
|
||||
let mut text = String::from_utf8(vfs.file_contents(file_id).to_vec()).unwrap();
|
||||
apply_document_changes(&mut text, params.content_changes);
|
||||
|
||||
vfs.set_file_contents(path.clone(), Some(text.into_bytes()));
|
||||
vfs.set_file_contents(path, Some(text.into_bytes()));
|
||||
}
|
||||
Ok(())
|
||||
})?
|
||||
|
||||
Reference in New Issue
Block a user