mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Remove non-needed clones
I am not certain if this will improve performance, but it seems having a .clone() without any need should be removed. This was done with clippy, and manually reviewed: ``` cargo clippy --fix -- -A clippy::all -D clippy::redundant_clone ```
This commit is contained in:
parent
a06525517b
commit
1d59c7b667
21 changed files with 25 additions and 33 deletions
|
@ -577,10 +577,9 @@ pub fn callable_sig_from_fnonce(
|
|||
let fn_once =
|
||||
TyBuilder::trait_ref(db, fn_once_trait).push(self_ty.clone()).push(args.clone()).build();
|
||||
let projection =
|
||||
TyBuilder::assoc_type_projection(db, output_assoc_type, Some(fn_once.substitution.clone()))
|
||||
.build();
|
||||
TyBuilder::assoc_type_projection(db, output_assoc_type, Some(fn_once.substitution)).build();
|
||||
|
||||
let ret_ty = db.normalize_projection(projection, env);
|
||||
|
||||
Some(CallableSig::from_params_and_return(params, ret_ty.clone(), false, Safety::Safe))
|
||||
Some(CallableSig::from_params_and_return(params, ret_ty, false, Safety::Safe))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue