feat(wasi)!: make most WasiFile methods take &mut self (#3901)
1. This makes it easier for implementors to deal with internal APIs. 2. This matches the signatures of the WASI Snapshot traits. Although it is likely true that these methods would have to become immutable in order to implement threading efficiently, threading will impact a large number of existing traits. So this change is practical for now with an already-unavoidable change required for threading. Signed-off-by: Nathaniel McCallum <nathaniel@profian.com>
This commit is contained in:
committed by
GitHub
parent
44a435a43a
commit
8b48ce7fb7
@@ -20,7 +20,7 @@ async fn empty_file_readable() -> Result<(), Error> {
|
||||
let d = workspace.open_dir("d").context("open dir")?;
|
||||
let d = Dir::from_cap_std(d);
|
||||
|
||||
let f = d
|
||||
let mut f = d
|
||||
.open_file(false, "f", OFlags::CREATE, false, true, FdFlags::empty())
|
||||
.await
|
||||
.context("create writable file f")?;
|
||||
|
||||
Reference in New Issue
Block a user