mirror of
https://github.com/Sarsoo/csbindgen.git
synced 2024-12-22 22:46:26 +00:00
add performance suggestion
This commit is contained in:
parent
1a9c89d5c3
commit
ef86e0c3ab
@ -9,7 +9,8 @@ enum FnItem {
|
||||
}
|
||||
|
||||
/// build a Vec of all Items, unless the Item is a Item::Mod, then append the Item contents of the vect
|
||||
/// Do this recursively
|
||||
/// Do this recursively.
|
||||
/// This is not memory-efficient, would work better with an iterator, but does not seem performance critical.
|
||||
fn depth_first_module_walk<'a>(ast: &'a Vec<Item>) -> Vec<&'a syn::Item>{
|
||||
let mut unwrapped_items : Vec<&syn::Item> = vec![];
|
||||
for item in ast {
|
||||
|
Loading…
Reference in New Issue
Block a user