Skip to content

Commit 5d681cf

Browse files
committed
Pass Ident by reference in ast Visitor
1 parent 54f9bc4 commit 5d681cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_utils/src/ast_utils/ident_iter.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl From<&Attribute> for IdentIter {
3939
struct IdentCollector(Vec<Ident>);
4040

4141
impl Visitor<'_> for IdentCollector {
42-
fn visit_ident(&mut self, ident: Ident) {
43-
self.0.push(ident);
42+
fn visit_ident(&mut self, ident: &Ident) {
43+
self.0.push(*ident);
4444
}
4545
}

0 commit comments

Comments
 (0)