Unnamed repository; edit this file 'description' to name the repository.
some changes
jnyfah 2025-03-17
parent 1bbc0fb · commit 061a643
-rw-r--r--crates/ide/src/inlay_hints/closure_ret.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ide/src/inlay_hints/closure_ret.rs b/crates/ide/src/inlay_hints/closure_ret.rs
index 03835ec1f4..22b8c72298 100644
--- a/crates/ide/src/inlay_hints/closure_ret.rs
+++ b/crates/ide/src/inlay_hints/closure_ret.rs
@@ -61,10 +61,9 @@ pub(super) fn hints(
if arrow.is_none() { " -> " } else { "" },
)
} else {
- let body = closure.body()?;
- let body_range = body.syntax().text_range();
-
Some(config.lazy_text_edit(|| {
+ let body = closure.body();
+ let body_range = body.expect("Closure must have a body").syntax().text_range();
let mut builder = TextEdit::builder();
let insert_pos = param_list.syntax().text_range().end();