feat(wasi): provide default implementations for WasiFile (#3904)
Additionally, as cleanup, remove duplicate implementations.
This commit is contained in:
committed by
GitHub
parent
ae4d86804d
commit
44a435a43a
@@ -187,12 +187,6 @@ macro_rules! wasi_file_impl {
|
||||
Err(e) => Err(e.into()),
|
||||
}
|
||||
}
|
||||
#[cfg(windows)]
|
||||
async fn readable(&self) -> Result<(), Error> {
|
||||
// Windows uses a rawfd based scheduler :(
|
||||
use wasi_common::ErrorExt;
|
||||
Err(Error::badf())
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
async fn writable(&self) -> Result<(), Error> {
|
||||
@@ -217,12 +211,6 @@ macro_rules! wasi_file_impl {
|
||||
Err(e) => Err(e.into()),
|
||||
}
|
||||
}
|
||||
#[cfg(windows)]
|
||||
async fn writable(&self) -> Result<(), Error> {
|
||||
// Windows uses a rawfd based scheduler :(
|
||||
use wasi_common::ErrorExt;
|
||||
Err(Error::badf())
|
||||
}
|
||||
|
||||
async fn sock_accept(&mut self, fdflags: FdFlags) -> Result<Box<dyn WasiFile>, Error> {
|
||||
block_on_dummy_executor(|| self.0.sock_accept(fdflags))
|
||||
|
||||
Reference in New Issue
Block a user