From 292e42addcb946ec7ca0da6987cf21f5801a36e4 Mon Sep 17 00:00:00 2001 From: Heyang Zhou Date: Wed, 26 Feb 2020 17:01:16 +0800 Subject: [PATCH 1/2] Update lib/runtime-core/src/typed_func.rs Co-Authored-By: Ivan Enderlin --- lib/runtime-core/src/typed_func.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/runtime-core/src/typed_func.rs b/lib/runtime-core/src/typed_func.rs index 50780955d..ec1f580b4 100644 --- a/lib/runtime-core/src/typed_func.rs +++ b/lib/runtime-core/src/typed_func.rs @@ -330,7 +330,7 @@ impl<'a> ErasedFunc<'a> { Type::F32 => Value::F32(f32::from_bits(*args.offset(i as _) as u32)), Type::F64 => Value::F64(f64::from_bits(*args.offset(i as _) as u64)), Type::V128 => { - panic!("enter_host_polymorphic: 128-bit types are not supported") + todo!("enter_host_polymorphic: 128-bit types are not supported") } } }) From a438a644b657e4c9bfc8fd5113f79788d9787cde Mon Sep 17 00:00:00 2001 From: Heyang Zhou Date: Wed, 26 Feb 2020 17:01:36 +0800 Subject: [PATCH 2/2] fold() -> sum() Co-Authored-By: Ivan Enderlin --- lib/runtime-core/src/trampoline_x64.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/runtime-core/src/trampoline_x64.rs b/lib/runtime-core/src/trampoline_x64.rs index 146068612..94bffb3cf 100644 --- a/lib/runtime-core/src/trampoline_x64.rs +++ b/lib/runtime-core/src/trampoline_x64.rs @@ -476,7 +476,7 @@ mod tests { } } - let expected = (0..=n as u64).fold(0u64, |a, b| a + b); + let expected = (0..=n as u64).sum(); prev = Some((ptr, expected)) } }