Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/inlay_hints/closure_ret.rs')
-rw-r--r--crates/ide/src/inlay_hints/closure_ret.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/ide/src/inlay_hints/closure_ret.rs b/crates/ide/src/inlay_hints/closure_ret.rs
index 9e600b5455..fef1cb83c1 100644
--- a/crates/ide/src/inlay_hints/closure_ret.rs
+++ b/crates/ide/src/inlay_hints/closure_ret.rs
@@ -55,11 +55,9 @@ pub(super) fn hints(
// Insert braces if necessary
let insert_braces = |builder: &mut TextEditBuilder| {
- if !has_block_body {
- if let Some(range) = closure.body().map(|b| b.syntax().text_range()) {
- builder.insert(range.start(), "{ ".to_owned());
- builder.insert(range.end(), " }".to_owned());
- }
+ if !has_block_body && let Some(range) = closure.body().map(|b| b.syntax().text_range()) {
+ builder.insert(range.start(), "{ ".to_owned());
+ builder.insert(range.end(), " }".to_owned());
}
};