vector on new system
This commit is contained in:
parent
e1a79fbffb
commit
eb2c033a98
@ -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
Loading…
x
Reference in New Issue
Block a user