From 914ce4034ada43a384fd3208a9e47db6f3a624ec Mon Sep 17 00:00:00 2001 From: baseballyama Date: Mon, 13 Jan 2025 10:15:16 +0900 Subject: [PATCH] fix lint --- crates/oxc_linter/src/rules/eslint/curly.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_linter/src/rules/eslint/curly.rs b/crates/oxc_linter/src/rules/eslint/curly.rs index 5c4b2cdede105..ea7022ed42545 100644 --- a/crates/oxc_linter/src/rules/eslint/curly.rs +++ b/crates/oxc_linter/src/rules/eslint/curly.rs @@ -305,7 +305,7 @@ fn report_if_needed<'a>( let needs_preceding_space = ctx .nodes() .parent_node(get_node_by_statement(body, ctx).id()) - .map_or(false, |parent| matches!(parent.kind(), AstKind::DoWhileStatement(_))); + .is_some_and(|parent| matches!(parent.kind(), AstKind::DoWhileStatement(_))); let mut fixed = ctx.source_range(body.span()).to_string(); if let Some(stripped) = fixed.strip_prefix(|c: char| c.is_whitespace() || c == '{') {