From c08deae8f2db2d2a9bb528d04d8ccd80ab0b59c7 Mon Sep 17 00:00:00 2001 From: Javier Cabrera Date: Wed, 22 Dec 2021 16:50:27 +0100 Subject: [PATCH] FIX: lazy enumerator split (#433) --- .../wasm-mutate/src/mutators/peephole/eggsy/expr_enumerator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/wasm-mutate/src/mutators/peephole/eggsy/expr_enumerator.rs b/crates/wasm-mutate/src/mutators/peephole/eggsy/expr_enumerator.rs index 19015528c3..4899f8ba5e 100644 --- a/crates/wasm-mutate/src/mutators/peephole/eggsy/expr_enumerator.rs +++ b/crates/wasm-mutate/src/mutators/peephole/eggsy/expr_enumerator.rs @@ -165,7 +165,7 @@ pub fn lazy_expand<'a>( let count = nodes.len(); // For each eclass, at least one node exists let split_at = rnd.borrow_mut().gen_range(0, count); - let indices = (0..split_at).into_iter().chain(split_at..count); + let indices = (split_at..count).into_iter().chain(0..split_at); let t = indices .map(move |i| nodes[i].clone()) .map(move |l| {