From 17bd739ba5e68214f04e8edd7708c51d1dcbb439 Mon Sep 17 00:00:00 2001
From: iximeow <me@iximeow.net>
Date: Fri, 28 Feb 2020 09:36:06 -0800
Subject: [PATCH] forgot to commit and push test fixes

---
 crates/test-programs/tests/wasm_tests/runtime.rs | 4 ++--
 crates/wasi-common/src/ctx.rs                    | 6 +++++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/crates/test-programs/tests/wasm_tests/runtime.rs b/crates/test-programs/tests/wasm_tests/runtime.rs
index ced1bb634c49..019990bd9669 100644
--- a/crates/test-programs/tests/wasm_tests/runtime.rs
+++ b/crates/test-programs/tests/wasm_tests/runtime.rs
@@ -31,12 +31,12 @@ pub fn instantiate(
             PreopenType::OS => {
                 let preopen_dir = wasi_common::preopen_dir(workspace)
                     .context(format!("error while preopening {:?}", workspace))?;
-                builder = builder.preopened_dir(preopen_dir, ".");
+                builder.preopened_dir(preopen_dir, ".");
             }
             PreopenType::Virtual => {
                 // we can ignore the workspace path for virtual preopens because virtual preopens
                 // don't exist in the filesystem anyway - no name conflict concerns.
-                builder = builder.preopened_virt(VirtualDirEntry::empty_directory(), ".");
+                builder.preopened_virt(VirtualDirEntry::empty_directory(), ".");
             }
         }
     }
diff --git a/crates/wasi-common/src/ctx.rs b/crates/wasi-common/src/ctx.rs
index 8bedfbc3d8c9..981007c51520 100644
--- a/crates/wasi-common/src/ctx.rs
+++ b/crates/wasi-common/src/ctx.rs
@@ -232,7 +232,11 @@ impl WasiCtxBuilder {
     }
 
     /// Add a preopened virtual directory.
-    pub fn preopened_virt<P: AsRef<Path>>(mut self, dir: VirtualDirEntry, guest_path: P) -> Self {
+    pub fn preopened_virt<P: AsRef<Path>>(
+        &mut self,
+        dir: VirtualDirEntry,
+        guest_path: P,
+    ) -> &mut Self {
         fn populate_directory(virtentry: HashMap<String, VirtualDirEntry>, dir: &mut VirtualDir) {
             for (path, entry) in virtentry.into_iter() {
                 match entry {