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

View File

@ -75,10 +75,7 @@ impl InferenceContext<'_> {
safety: chalk_ir::Safety::Safe,
variadic: false,
},
substitution: FnSubst(Substitution::from_iter(
&Interner,
sig_tys.clone(),
)),
substitution: FnSubst(Substitution::from_iter(&Interner, sig_tys)),
});
}
}

View File

@ -636,7 +636,7 @@ impl GlobalState {
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(())
})?