diff options
| author | maxcabrajac <max@cabrajac.com> | 2024-10-24 10:41:44 -0300 |
|---|---|---|
| committer | maxcabrajac <max@cabrajac.com> | 2024-10-24 11:10:49 -0300 |
| commit | 5d681cfe78aa8bde43f65ee73ac811cd38e23f8f (patch) | |
| tree | bc4d3ef03834fdade97067931b0dfdc7d0495687 | |
| parent | 54f9bc4884581f3202c139c94af5507be1d54ff0 (diff) | |
| download | rust-5d681cfe78aa8bde43f65ee73ac811cd38e23f8f.tar.gz rust-5d681cfe78aa8bde43f65ee73ac811cd38e23f8f.zip | |
Pass Ident by reference in ast Visitor
| -rw-r--r-- | clippy_utils/src/ast_utils/ident_iter.rs | 4 |
1 files 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 032cd3ed739..22b2c895f7c 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<Ident>); 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); } } |
