mirror of
https://github.com/Noratrieb/cargo-minimize.git
synced 2026-01-15 17:05:00 +01:00
improve tracking for structs and fields
This commit is contained in:
parent
9ce2c89f4d
commit
fa0b3021a9
2 changed files with 28 additions and 0 deletions
|
|
@ -31,6 +31,18 @@ impl VisitMut for Visitor<'_> {
|
|||
}
|
||||
}
|
||||
|
||||
fn visit_field_mut(&mut self, field: &mut syn::Field) {
|
||||
self.current_path.push(field.ident.to_string());
|
||||
syn::visit_mut::visit_field_mut(self, method);
|
||||
self.current_path.pop();
|
||||
}
|
||||
|
||||
fn visit_item_struct_mut(&mut self, struct_: &mut syn::ItemStruct) {
|
||||
self.current_path.push(struct_.ident.to_string());
|
||||
syn::visit_mut::visit_item_struct_mut(self, method);
|
||||
self.current_path.pop();
|
||||
}
|
||||
|
||||
tracking!();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue