Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/inlay_hints/adjustment.rs')
| -rw-r--r-- | crates/ide/src/inlay_hints/adjustment.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ide/src/inlay_hints/adjustment.rs b/crates/ide/src/inlay_hints/adjustment.rs index 4e48baa6f1..013e008bf9 100644 --- a/crates/ide/src/inlay_hints/adjustment.rs +++ b/crates/ide/src/inlay_hints/adjustment.rs @@ -183,7 +183,7 @@ pub(super) fn hints( return None; } if allow_edit { - let edit = { + let edit = Some(config.lazy_text_edit(|| { let mut b = TextEditBuilder::default(); if let Some(pre) = &pre { b.insert( @@ -198,14 +198,14 @@ pub(super) fn hints( ); } b.finish() - }; + })); match (&mut pre, &mut post) { (Some(pre), Some(post)) => { - pre.text_edit = Some(edit.clone()); - post.text_edit = Some(edit); + pre.text_edit = edit.clone(); + post.text_edit = edit; } - (Some(pre), None) => pre.text_edit = Some(edit), - (None, Some(post)) => post.text_edit = Some(edit), + (Some(pre), None) => pre.text_edit = edit, + (None, Some(post)) => post.text_edit = edit, (None, None) => (), } } |