Fixed issue #12

trunk
ondra05 2022-09-14 21:46:17 +02:00
parent a9cdc03341
commit c4fda0c0ec
1 changed files with 8 additions and 3 deletions

View File

@ -523,18 +523,23 @@ impl<H: HostInterface> ExecEnv<H> {
.take(n_alternations) .take(n_alternations)
.map(|chunk| ValueRef::clone(&chunk[0])) .map(|chunk| ValueRef::clone(&chunk[0]))
.chain( .chain(
args[2 * n_alternations..] args.get(2 * n_alternations..)
.iter() .iter()
.copied()
.flatten()
.map(ValueRef::clone) .map(ValueRef::clone)
.take(extra_l), .take(extra_l),
) )
.collect(), .collect(),
args.chunks(2) args.chunks(2)
.take(n_alternations) .take(n_alternations)
.map(|chunk| ValueRef::clone(&chunk[1])) .flat_map(|chunk| chunk.get(1))
.map(ValueRef::clone)
.chain( .chain(
args[2 * n_alternations..] args.get(2 * n_alternations..)
.iter() .iter()
.copied()
.flatten()
.map(ValueRef::clone) .map(ValueRef::clone)
.take(extra_r), .take(extra_r),
) )