diff --git a/crates/ide_assists/src/handlers/destructure_tuple_binding.rs b/crates/ide_assists/src/handlers/destructure_tuple_binding.rs index a1aa0a04572..1fe58442bf7 100644 --- a/crates/ide_assists/src/handlers/destructure_tuple_binding.rs +++ b/crates/ide_assists/src/handlers/destructure_tuple_binding.rs @@ -58,16 +58,6 @@ pub(crate) fn destructure_tuple_binding_impl( let ident_pat = ctx.find_node_at_offset::()?; let data = collect_data(ident_pat, ctx)?; - acc.add( - AssistId("destructure_tuple_binding", AssistKind::RefactorRewrite), - if with_sub_pattern { "Destructure tuple in place" } else { "Destructure tuple" }, - data.range, - |builder| { - edit_tuple_assignment(&data, builder, ctx, false); - edit_tuple_usages(&data, builder, ctx, false); - }, - ); - if with_sub_pattern { acc.add( AssistId("destructure_tuple_binding_in_sub_pattern", AssistKind::RefactorRewrite), @@ -80,6 +70,16 @@ pub(crate) fn destructure_tuple_binding_impl( ); } + acc.add( + AssistId("destructure_tuple_binding", AssistKind::RefactorRewrite), + if with_sub_pattern { "Destructure tuple in place" } else { "Destructure tuple" }, + data.range, + |builder| { + edit_tuple_assignment(&data, builder, ctx, false); + edit_tuple_usages(&data, builder, ctx, false); + }, + ); + Some(()) }