Skip to content

Commit

Permalink
perf(linter): remove redundant clone of diagnostics in context (#5797)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonIsaac committed Sep 16, 2024
1 parent e413cad commit 1bfa515
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 1bfa515

Please sign in to comment.