remove more redundant clones manually
This commit is contained in:
parent
476e10e961
commit
b22bd36f6e
@ -233,7 +233,6 @@ impl InferenceContext<'_> {
|
||||
};
|
||||
let mut expectations_iter = expectations
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|a| a.assert_ty_ref(Interner).clone())
|
||||
.chain(repeat_with(|| self.table.new_type_var()));
|
||||
|
||||
|
@ -3673,7 +3673,6 @@ impl Closure {
|
||||
let (captures, _) = infer.closure_info(&self.id);
|
||||
captures
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|capture| Type {
|
||||
env: db.trait_environment_for_body(owner),
|
||||
ty: capture.ty(&self.subst),
|
||||
|
@ -79,7 +79,7 @@ pub(crate) fn goto_definition(
|
||||
return Some(vec![x]);
|
||||
}
|
||||
|
||||
if let Some(x) = try_lookup_macro_def_in_macro_use(sema, token.clone()) {
|
||||
if let Some(x) = try_lookup_macro_def_in_macro_use(sema, token) {
|
||||
return Some(vec![x]);
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ impl FieldOrTupleIdx {
|
||||
.as_str()
|
||||
.map(|s| s.to_owned())
|
||||
.unwrap_or_else(|| format!(".{}", f.name(db).as_tuple_index().unwrap())),
|
||||
FieldOrTupleIdx::TupleIdx(i) => format!(".{i}").to_owned(),
|
||||
FieldOrTupleIdx::TupleIdx(i) => format!(".{i}"),
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -203,7 +203,7 @@ pub(crate) fn view_memory_layout(
|
||||
|
||||
let mut nodes = vec![MemoryLayoutNode {
|
||||
item_name,
|
||||
typename: typename.clone(),
|
||||
typename,
|
||||
size: layout.size(),
|
||||
offset: 0,
|
||||
alignment: layout.align(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user