perf(linter): remove redundant clone of diagnostics in context (#5797)

This commit is contained in:
DonIsaac 2024-09-16 04:22:07 +00:00
parent e413cad0d7
commit 1bfa515088

View file

@ -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>) {