Browse Source

dead code

pull/6374/head
Pat Hickey 2 years ago
parent
commit
ea15c6f3c5
  1. 11
      src/descriptors.rs

11
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)
}

Loading…
Cancel
Save