Remove visit_name from the AST visitor.
Because the default is empty and it's never overridden. This means `walk_ident` can also be removed, because it does nothing.
This commit is contained in:
@@ -16,9 +16,8 @@ impl NodeCounter {
|
||||
}
|
||||
|
||||
impl<'ast> Visitor<'ast> for NodeCounter {
|
||||
fn visit_ident(&mut self, ident: Ident) {
|
||||
fn visit_ident(&mut self, _ident: Ident) {
|
||||
self.count += 1;
|
||||
walk_ident(self, ident);
|
||||
}
|
||||
fn visit_foreign_item(&mut self, i: &ForeignItem) {
|
||||
self.count += 1;
|
||||
|
||||
Reference in New Issue
Block a user