Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

update readdir etc to use new error handling scheme #47

Merged
merged 1 commit into from
Jan 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions host/src/filesystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ impl wasi_filesystem::WasiFilesystem for WasiCtx {

self.table_mut()
.push(Box::new(Mutex::new(iterator)))
.map(Ok)
.map_err(convert)
}

Expand All @@ -359,11 +360,11 @@ impl wasi_filesystem::WasiFilesystem for WasiCtx {
.transpose()
.map_err(convert)?;

Ok(entity.map(|e| wasi_filesystem::DirEntry {
Ok(Ok(entity.map(|e| wasi_filesystem::DirEntry {
ino: Some(e.inode),
type_: e.filetype.into(),
name: e.name,
}))
})))
}

async fn close_dir_entry_stream(
Expand Down