From ef86e0c3ab251093a09cda099a3c6f5d5239f55a Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Tue, 16 May 2023 18:59:26 -0500 Subject: [PATCH] add performance suggestion --- csbindgen/src/parser.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/csbindgen/src/parser.rs b/csbindgen/src/parser.rs index 0f2ff2b..6a9d486 100644 --- a/csbindgen/src/parser.rs +++ b/csbindgen/src/parser.rs @@ -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) -> Vec<&'a syn::Item>{ let mut unwrapped_items : Vec<&syn::Item> = vec![]; for item in ast {