From 5d681cfe78aa8bde43f65ee73ac811cd38e23f8f Mon Sep 17 00:00:00 2001 From: maxcabrajac Date: Thu, 24 Oct 2024 10:41:44 -0300 Subject: [PATCH] Pass Ident by reference in ast Visitor --- clippy_utils/src/ast_utils/ident_iter.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_utils/src/ast_utils/ident_iter.rs b/clippy_utils/src/ast_utils/ident_iter.rs index 032cd3ed7399f..22b2c895f7c50 100644 --- a/clippy_utils/src/ast_utils/ident_iter.rs +++ b/clippy_utils/src/ast_utils/ident_iter.rs @@ -39,7 +39,7 @@ impl From<&Attribute> for IdentIter { struct IdentCollector(Vec); impl Visitor<'_> for IdentCollector { - fn visit_ident(&mut self, ident: Ident) { - self.0.push(ident); + fn visit_ident(&mut self, ident: &Ident) { + self.0.push(*ident); } }