Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/inlay_hints/closing_brace.rs')
-rw-r--r--crates/ide/src/inlay_hints/closing_brace.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ide/src/inlay_hints/closing_brace.rs b/crates/ide/src/inlay_hints/closing_brace.rs
index 05253b6794..e80c9dc9d4 100644
--- a/crates/ide/src/inlay_hints/closing_brace.rs
+++ b/crates/ide/src/inlay_hints/closing_brace.rs
@@ -120,11 +120,11 @@ pub(super) fn hints(
};
if let Some(mut next) = closing_token.next_token() {
- if next.kind() == T![;] {
- if let Some(tok) = next.next_token() {
- closing_token = next;
- next = tok;
- }
+ if next.kind() == T![;]
+ && let Some(tok) = next.next_token()
+ {
+ closing_token = next;
+ next = tok;
}
if !(next.kind() == SyntaxKind::WHITESPACE && next.text().contains('\n')) {
// Only display the hint if the `}` is the last token on the line