diff --git a/compiler/noirc_frontend/src/tests.rs b/compiler/noirc_frontend/src/tests.rs index ce3ef87c1a8..2619189ee8d 100644 --- a/compiler/noirc_frontend/src/tests.rs +++ b/compiler/noirc_frontend/src/tests.rs @@ -41,10 +41,9 @@ mod test { pub(crate) fn remove_experimental_warnings(errors: &mut Vec<(CompilationError, FileId)>) { errors.retain(|(error, _)| match error { - CompilationError::ParseError(error) => match error.reason() { - Some(ParserErrorReason::ExperimentalFeature(..)) => false, - _ => true, - }, + CompilationError::ParseError(error) => { + !matches!(error.reason(), Some(ParserErrorReason::ExperimentalFeature(..))) + } _ => true, }); }