We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3464cb5 commit fc4dad3Copy full SHA for fc4dad3
crates/wasmtime/src/runtime/component/func/typed.rs
@@ -2274,7 +2274,7 @@ where
2274
bail!("map pointer is not aligned");
2275
}
2276
2277
- let mut result = HashMap::with_capacity(len);
+ let mut result = HashMap::with_capacity(len)?;
2278
for i in 0..len {
2279
let entry_base = ptr + (i * tuple_size);
2280
@@ -2287,7 +2287,7 @@ where
2287
let value_bytes = &cx.memory()[entry_base + value_field..][..V::SIZE32];
2288
let value = V::linear_lift_from_memory(cx, value_ty, value_bytes)?;
2289
2290
- result.insert(key, value);
+ result.insert(key, value)?;
2291
2292
2293
Ok(result)
0 commit comments