Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/hir-ty/src/infer/pat.rs1
-rw-r--r--crates/hir/src/lib.rs1
-rw-r--r--crates/ide/src/goto_definition.rs2
-rw-r--r--crates/ide/src/view_memory_layout.rs4
4 files changed, 3 insertions, 5 deletions
diff --git a/crates/hir-ty/src/infer/pat.rs b/crates/hir-ty/src/infer/pat.rs
index 3fdd76f7cd..1bf8babe83 100644
--- a/crates/hir-ty/src/infer/pat.rs
+++ b/crates/hir-ty/src/infer/pat.rs
@@ -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()));
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index 2428783161..fd843945df 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -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),
diff --git a/crates/ide/src/goto_definition.rs b/crates/ide/src/goto_definition.rs
index e0beba8fb3..d64295bdd6 100644
--- a/crates/ide/src/goto_definition.rs
+++ b/crates/ide/src/goto_definition.rs
@@ -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]);
}
}
diff --git a/crates/ide/src/view_memory_layout.rs b/crates/ide/src/view_memory_layout.rs
index 3802978f49..53f998e545 100644
--- a/crates/ide/src/view_memory_layout.rs
+++ b/crates/ide/src/view_memory_layout.rs
@@ -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(),