A lightweight WebAssembly runtime that is fast, secure, and standards-compliant
Use `try_new::<Arc<_>>` in `Engine::load_code` (#12607)
Nick Fitzgerald7357e7c93d77
diff --git a/crates/wasmtime/src/engine.rs b/crates/wasmtime/src/engine.rsindex cfb8c4eba4..f0f729c62e 100644--- a/crates/wasmtime/src/engine.rs+++ b/crates/wasmtime/src/engine.rs@@ -940,7 +940,7 @@ impl Engine {serialization::check_compatible(self, &mmap, expected)?;let mut code = crate::CodeMemory::new(self, mmap)?;code.publish()?;- Ok(Arc::new(code))+ Ok(try_new(code)?)}/// Unload process-related trap/signal handlers and destroy this engine.