Skip to content

Commit

Permalink
perf(linter): redundant clone of diagnostics in context
Browse files Browse the repository at this point in the history
  • Loading branch information
DonIsaac committed Sep 15, 2024
1 parent ecaa30e commit 3d9577d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/oxc_linter/src/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ impl<'a> LintContext<'a> {
/* Diagnostics */

pub fn into_message(self) -> Vec<Message<'a>> {
self.diagnostics.borrow().iter().cloned().collect::<Vec<_>>()
self.diagnostics.into_inner()
}

fn add_diagnostic(&self, mut message: Message<'a>) {
Expand Down

0 comments on commit 3d9577d

Please sign in to comment.