Skip to content

Commit 4bb429a

Browse files
authored
Use try_new for Arc in MmapMemory::new (bytecodealliance#12851)
1 parent 6ce71e9 commit 4bb429a

File tree

1 file changed

+1
-1
lines changed
  • crates/wasmtime/src/runtime/vm/memory

1 file changed

+1
-1
lines changed

crates/wasmtime/src/runtime/vm/memory/mmap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ impl MmapMemory {
115115
}
116116

117117
Ok(Self {
118-
mmap: Arc::new(mmap),
118+
mmap: try_new::<Arc<_>>(mmap)?,
119119
len: minimum,
120120
maximum,
121121
pre_guard_size: pre_guard_bytes,

0 commit comments

Comments
 (0)