Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/replace_derive_with_manual_impl.rs')
-rw-r--r--crates/ide-assists/src/handlers/replace_derive_with_manual_impl.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/ide-assists/src/handlers/replace_derive_with_manual_impl.rs b/crates/ide-assists/src/handlers/replace_derive_with_manual_impl.rs
index 62b4e04950..04c9d8e54d 100644
--- a/crates/ide-assists/src/handlers/replace_derive_with_manual_impl.rs
+++ b/crates/ide-assists/src/handlers/replace_derive_with_manual_impl.rs
@@ -220,10 +220,8 @@ fn impl_def_from_trait(
&impl_def,
&target_scope,
);
- let assoc_item_list = if let Some((first, other)) =
- assoc_items.split_first().map(|(first, other)| (first.clone_subtree(), other))
- {
- let first_item = if let ast::AssocItem::Fn(ref func) = first
+ let assoc_item_list = if let Some((first, other)) = assoc_items.split_first() {
+ let first_item = if let ast::AssocItem::Fn(func) = first
&& let Some(body) = gen_trait_fn_body(&make, func, trait_path, adt, None)
&& let Some(func_body) = func.body()
{