From 2bbc893042c7b226e899e329d52e8fb78f45411d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Esp=C3=ADn?= Date: Mon, 2 Jan 2023 23:21:19 +0100 Subject: [PATCH] Fix wasmer-rust readme example --- lib/api/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/api/README.md b/lib/api/README.md index 46a016fb8ab..38b4f2839bb 100644 --- a/lib/api/README.md +++ b/lib/api/README.md @@ -29,10 +29,10 @@ fn main() -> anyhow::Result<()> { let module = Module::new(&store, &module_wat)?; // The module doesn't import anything, so we create an empty import object. let import_object = imports! {}; - let instance = Instance::new(&module, &import_object)?; + let instance = Instance::new(&mut store, &module, &import_object)?; let add_one = instance.exports.get_function("add_one")?; - let result = add_one.call(&[Value::I32(42)])?; + let result = add_one.call(&mut store, &[Value::I32(42)])?; assert_eq!(result[0], Value::I32(43)); Ok(())