contracts: Way to many locals where generated for benchmarks (fixed that) (#9353)

This commit is contained in:
Alexander Theißen
2021-07-15 12:02:32 +02:00
committed by GitHub
parent 2e986dd352
commit 76d147439a
@@ -508,7 +508,7 @@ pub mod body {
/// Replace the locals of the supplied `body` with `num` i64 locals.
pub fn inject_locals(body: &mut FuncBody, num: u32) {
use self::elements::Local;
*body.locals_mut() = (0..num).map(|i| Local::new(i, ValueType::I64)).collect()
*body.locals_mut() = vec![Local::new(num, ValueType::I64)];
}
}