diff options
Diffstat (limited to 'crates/assists/src/handlers')
-rw-r--r-- | crates/assists/src/handlers/unwrap_block.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/assists/src/handlers/unwrap_block.rs b/crates/assists/src/handlers/unwrap_block.rs index 36ef871b9..a82399aa8 100644 --- a/crates/assists/src/handlers/unwrap_block.rs +++ b/crates/assists/src/handlers/unwrap_block.rs | |||
@@ -83,8 +83,8 @@ pub(crate) fn unwrap_block(acc: &mut Assists, ctx: &AssistContext) -> Option<()> | |||
83 | _ => return None, | 83 | _ => return None, |
84 | }; | 84 | }; |
85 | 85 | ||
86 | let target = block.syntax().text_range(); | ||
86 | let unwrapped = unwrap_trivial_block(block); | 87 | let unwrapped = unwrap_trivial_block(block); |
87 | let target = unwrapped.syntax().text_range(); | ||
88 | acc.add(assist_id, assist_label, target, |builder| { | 88 | acc.add(assist_id, assist_label, target, |builder| { |
89 | builder.replace( | 89 | builder.replace( |
90 | parent.syntax().text_range(), | 90 | parent.syntax().text_range(), |