1
Fork 0

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:
Nicholas Nethercote 2022-07-29 13:43:28 +10:00
parent ab44b5a408
commit 6dced80b86
2 changed files with 4 additions and 18 deletions

View file

@ -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;