Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/destructure_tuple_binding.rs')
-rw-r--r--crates/ide-assists/src/handlers/destructure_tuple_binding.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/crates/ide-assists/src/handlers/destructure_tuple_binding.rs b/crates/ide-assists/src/handlers/destructure_tuple_binding.rs
index 2dc30e685a..65b497e83a 100644
--- a/crates/ide-assists/src/handlers/destructure_tuple_binding.rs
+++ b/crates/ide-assists/src/handlers/destructure_tuple_binding.rs
@@ -197,15 +197,7 @@ impl AssignmentEdit {
fn apply(self) {
// with sub_pattern: keep original tuple and add subpattern: `tup @ (_0, _1)`
if self.in_sub_pattern {
- ted::insert_all_raw(
- ted::Position::after(self.ident_pat.syntax()),
- vec![
- make::tokens::single_space().into(),
- make::token(T![@]).into(),
- make::tokens::single_space().into(),
- self.tuple_pat.syntax().clone().into(),
- ],
- )
+ self.ident_pat.set_pat(Some(self.tuple_pat.into()))
} else {
ted::replace(self.ident_pat.syntax(), self.tuple_pat.syntax())
}