Skip to content

Commit c5d6c3f

Browse files
committed
no need for preopened_path really
1 parent a6a8a7f commit c5d6c3f

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

  • crates/wasi-common/cap-std-sync/src

crates/wasi-common/cap-std-sync/src/lib.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -120,18 +120,6 @@ impl WasiCtxBuilder {
120120
let dir = Box::new(crate::dir::Dir::from_cap_std(dir));
121121
Ok(WasiCtxBuilder(self.0.preopened_dir(dir, guest_path)?))
122122
}
123-
124-
pub fn preopened_path(
125-
self,
126-
host_path: impl AsRef<Path>,
127-
guest_path: impl AsRef<Path>,
128-
) -> Result<Self, Error> {
129-
let host_path = host_path.as_ref();
130-
let dir = unsafe { Dir::open_ambient_dir(host_path) }
131-
.with_context(|| format!("Failed to preopen host path: {:?}", host_path))?;
132-
self.preopened_dir(dir, guest_path)
133-
}
134-
135123
pub fn build(self) -> Result<WasiCtx, Error> {
136124
self.0.build()
137125
}

0 commit comments

Comments
 (0)