diff --git a/crates/oxc_linter/src/context/mod.rs b/crates/oxc_linter/src/context/mod.rs index 0f8e14a8be5086..c4c8ead2d43ccd 100644 --- a/crates/oxc_linter/src/context/mod.rs +++ b/crates/oxc_linter/src/context/mod.rs @@ -159,7 +159,7 @@ impl<'a> LintContext<'a> { /* Diagnostics */ pub fn into_message(self) -> Vec> { - self.diagnostics.borrow().iter().cloned().collect::>() + self.diagnostics.into_inner() } fn add_diagnostic(&self, mut message: Message<'a>) {