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:
parent
ab44b5a408
commit
6dced80b86
2 changed files with 4 additions and 18 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue