diff --git a/src/descriptors.rs b/src/descriptors.rs index fb534b2c12..59e8661b1f 100644 --- a/src/descriptors.rs +++ b/src/descriptors.rs @@ -374,17 +374,6 @@ impl Descriptors { } } - pub fn get_file_or_dir(&self, fd: Fd, error: Errno) -> Result<&File, Errno> { - match self.get(fd)? { - Descriptor::Streams(Streams { - type_: StreamType::File(file), - .. - }) => Ok(file), - Descriptor::Closed(_) => Err(wasi::ERRNO_BADF), - _ => Err(error), - } - } - pub fn get_seekable_file(&self, fd: Fd) -> Result<&File, Errno> { self.get_file_with_error(fd, wasi::ERRNO_SPIPE) }