Remove some redundant clones

This commit is contained in:
Laurențiu Nicola
2021-07-27 12:28:58 +03:00
parent 6a2a0b7abb
commit ea0014c500
2 changed files with 2 additions and 5 deletions
+1 -4
View File
@@ -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)),
});
}
}
+1 -1
View File
@@ -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(())
})?