diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_extra_non_null_assertion.rs b/crates/rome_js_analyze/src/analyzers/nursery/no_extra_non_null_assertion.rs index 79028570e39..1614df77860 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/no_extra_non_null_assertion.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/no_extra_non_null_assertion.rs @@ -73,12 +73,7 @@ impl Rule for NoExtraNonNullAssertion { // Cases considered as invalid: // - TsNonNullAssertionAssignment > TsNonNullAssertionAssignment - let has_extra_non_assertion = match parent { - JsAnyAssignment::TsNonNullAssertionAssignment(_) => true, - _ => false, - }; - - if has_extra_non_assertion { + if matches!(parent, JsAnyAssignment::TsNonNullAssertionAssignment(_)) { return Some(()); } }