From fbdc59c54a065def2acc44300db3945758003c91 Mon Sep 17 00:00:00 2001 From: roife Date: Fri, 5 Jan 2024 13:39:42 +0800 Subject: [PATCH] internal: remove unnecessary path_tranform on type_gen_args in generate_delegate_trait. --- crates/ide-assists/src/handlers/generate_delegate_trait.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/crates/ide-assists/src/handlers/generate_delegate_trait.rs b/crates/ide-assists/src/handlers/generate_delegate_trait.rs index af2b60d22a..7731addcdd 100644 --- a/crates/ide-assists/src/handlers/generate_delegate_trait.rs +++ b/crates/ide-assists/src/handlers/generate_delegate_trait.rs @@ -351,11 +351,7 @@ fn generate_impl( transform_impl(ctx, ast_strukt, &old_impl, &transform_args, &trait_args.syntax())?; } - let mut type_gen_args = strukt_params.clone().map(|params| params.to_generic_args()); - if let Some(type_args) = &mut type_gen_args { - *type_args = type_args.clone_for_update(); - transform_impl(ctx, ast_strukt, &old_impl, &transform_args, &type_args.syntax())?; - } + let type_gen_args = strukt_params.clone().map(|params| params.to_generic_args()); let path_type = make::ty(&trait_.name(db).to_smol_str()).clone_for_update(); transform_impl(ctx, ast_strukt, &old_impl, &transform_args, &path_type.syntax())?;