Skip to content

Commit

Permalink
internal: remove unnecessary path_tranform on type_gen_args in genera…
Browse files Browse the repository at this point in the history
…te_delegate_trait.
  • Loading branch information
roife committed Jan 5, 2024
1 parent bf0c4ac commit fbdc59c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions crates/ide-assists/src/handlers/generate_delegate_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())?;
Expand Down

0 comments on commit fbdc59c

Please sign in to comment.