vector on new system

This commit is contained in:
Rowan Torbitzky-Lane 2025-04-19 18:50:32 -05:00
parent e1a79fbffb
commit eb2c033a98
2 changed files with 151 additions and 743 deletions

View File

@ -111,12 +111,17 @@ impl ToTokens for Extract {
true => quote! { true => quote! {
let result = #inner_func(#(#value_vars.clone()),*); let result = #inner_func(#(#value_vars.clone()),*);
if let Some(result) = result { if let Some(result) = result {
#inner_state.#inner_out_stack.extend(result.iter()); // Transforming the result vector into an iterator with .iter() was
// causing problems with the vector_string stack. Iterating this way
// fixes the problem.
for n in 0..result.len() {
#inner_state.#inner_out_stack.push(result[n].clone())
}
} else { } else {
#(#restore_values)* #(#restore_values)*
} }
}, },
false => quote! { false => quote! { // This arm is used most of the time
let result = #inner_func(#(#value_vars.clone()),*); let result = #inner_func(#(#value_vars.clone()),*);
if let Some(result) = result { if let Some(result) = result {
#inner_state.#inner_out_stack.push(result); #inner_state.#inner_out_stack.push(result);

File diff suppressed because it is too large Load Diff