Skip to content

Commit

Permalink
feat(wasi) Update WasiStateCreationgError::FsError to `…::FileSyste…
Browse files Browse the repository at this point in the history
…mError`.
  • Loading branch information
Hywan committed Aug 30, 2021
1 parent a4525e0 commit 768eb5c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/wasi/src/state/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub enum WasiStateCreationError {
#[error("wasi filesystem setup error: `{0}`")]
WasiFsSetupError(String),
#[error(transparent)]
FsError(FsError),
FileSystemError(FsError),
}

fn validate_mapped_dir_alias(alias: &str) -> Result<(), WasiStateCreationError> {
Expand Down Expand Up @@ -398,17 +398,17 @@ impl WasiStateBuilder {
if let Some(stdin_override) = self.stdin_override.take() {
wasi_fs
.swap_file(__WASI_STDIN_FILENO, stdin_override)
.map_err(WasiStateCreationError::FsError)?;
.map_err(WasiStateCreationError::FileSystemError)?;
}
if let Some(stdout_override) = self.stdout_override.take() {
wasi_fs
.swap_file(__WASI_STDOUT_FILENO, stdout_override)
.map_err(WasiStateCreationError::FsError)?;
.map_err(WasiStateCreationError::FileSystemError)?;
}
if let Some(stderr_override) = self.stderr_override.take() {
wasi_fs
.swap_file(__WASI_STDERR_FILENO, stderr_override)
.map_err(WasiStateCreationError::FsError)?;
.map_err(WasiStateCreationError::FileSystemError)?;
}
if let Some(f) = &self.setup_fs_fn {
f(&mut wasi_fs).map_err(WasiStateCreationError::WasiFsSetupError)?;
Expand Down

0 comments on commit 768eb5c

Please sign in to comment.