From 29da2071385b0769bc1252d9bfe56b16f1d6ce65 Mon Sep 17 00:00:00 2001 From: Daniel Macovei Date: Mon, 10 Jun 2024 23:23:37 -0500 Subject: [PATCH] fix fuzz --- fuzz/src/roundtrip_wit.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fuzz/src/roundtrip_wit.rs b/fuzz/src/roundtrip_wit.rs index 19967992e1..ae240e4308 100644 --- a/fuzz/src/roundtrip_wit.rs +++ b/fuzz/src/roundtrip_wit.rs @@ -28,8 +28,8 @@ pub fn run(u: &mut Unstructured<'_>) -> Result<()> { } let pkg2 = pkgs2[0]; - let wasm2 = - wit_component::encode(Some(true), &resolve2, pkg2).expect("failed to encode WIT document"); + let wasm2 = wit_component::encode(Some(true), &resolve2, &[pkg2]) + .expect("failed to encode WIT document"); write_file("doc2.wasm", &wasm2); roundtrip_through_printing("doc2", &resolve2, &wasm2); @@ -96,7 +96,7 @@ fn roundtrip_through_printing(file: &str, resolve: &Resolve, wasm: &[u8]) { // Finally encode the `new_resolve` which should be the exact same as // before. - let wasm2 = wit_component::encode(Some(true), &new_resolve, last.unwrap()).unwrap(); + let wasm2 = wit_component::encode(Some(true), &new_resolve, &[last.unwrap()]).unwrap(); write_file(&format!("{file}-reencoded.wasm"), &wasm2); if wasm != wasm2 { panic!("failed to roundtrip through text printing");