Assist target should point at *existing* code
This commit is contained in:
parent
d4c970d1f2
commit
8dd0b7d2b5
@ -83,8 +83,8 @@ pub(crate) fn unwrap_block(acc: &mut Assists, ctx: &AssistContext) -> Option<()>
|
||||
_ => return None,
|
||||
};
|
||||
|
||||
let target = block.syntax().text_range();
|
||||
let unwrapped = unwrap_trivial_block(block);
|
||||
let target = unwrapped.syntax().text_range();
|
||||
acc.add(assist_id, assist_label, target, |builder| {
|
||||
builder.replace(
|
||||
parent.syntax().text_range(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user