Skip to content

Commit 17bd739

Browse files
committed
forgot to commit and push test fixes
1 parent b43b4bf commit 17bd739

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

crates/test-programs/tests/wasm_tests/runtime.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ pub fn instantiate(
3131
PreopenType::OS => {
3232
let preopen_dir = wasi_common::preopen_dir(workspace)
3333
.context(format!("error while preopening {:?}", workspace))?;
34-
builder = builder.preopened_dir(preopen_dir, ".");
34+
builder.preopened_dir(preopen_dir, ".");
3535
}
3636
PreopenType::Virtual => {
3737
// we can ignore the workspace path for virtual preopens because virtual preopens
3838
// don't exist in the filesystem anyway - no name conflict concerns.
39-
builder = builder.preopened_virt(VirtualDirEntry::empty_directory(), ".");
39+
builder.preopened_virt(VirtualDirEntry::empty_directory(), ".");
4040
}
4141
}
4242
}

crates/wasi-common/src/ctx.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,11 @@ impl WasiCtxBuilder {
232232
}
233233

234234
/// Add a preopened virtual directory.
235-
pub fn preopened_virt<P: AsRef<Path>>(mut self, dir: VirtualDirEntry, guest_path: P) -> Self {
235+
pub fn preopened_virt<P: AsRef<Path>>(
236+
&mut self,
237+
dir: VirtualDirEntry,
238+
guest_path: P,
239+
) -> &mut Self {
236240
fn populate_directory(virtentry: HashMap<String, VirtualDirEntry>, dir: &mut VirtualDir) {
237241
for (path, entry) in virtentry.into_iter() {
238242
match entry {

0 commit comments

Comments
 (0)