@@ -597,14 +597,14 @@ fn open_at(fd: &WasiFd, path: &Path, opts: &OpenOptions) -> io::Result<File> {
597
597
///
598
598
/// WASI has no fundamental capability to do this. All syscalls and operations
599
599
/// are relative to already-open file descriptors. The C library, however,
600
- /// manages a map of preopened file descriptors to their path, and then the C
600
+ /// manages a map of pre-opened file descriptors to their path, and then the C
601
601
/// library provides an API to look at this. In other words, when you want to
602
602
/// open a path `p`, you have to find a previously opened file descriptor in a
603
603
/// global table and then see if `p` is relative to that file descriptor.
604
604
///
605
605
/// This function, if successful, will return two items:
606
606
///
607
- /// * The first is a `ManuallyDrop<WasiFd>`. This represents a preopened file
607
+ /// * The first is a `ManuallyDrop<WasiFd>`. This represents a pre-opened file
608
608
/// descriptor which we don't have ownership of, but we can use. You shouldn't
609
609
/// actually drop the `fd`.
610
610
///
@@ -619,15 +619,15 @@ fn open_at(fd: &WasiFd, path: &Path, opts: &OpenOptions) -> io::Result<File> {
619
619
/// appropriate rights for performing `rights` actions.
620
620
///
621
621
/// Note that this can fail if `p` doesn't look like it can be opened relative
622
- /// to any preopened file descriptor.
622
+ /// to any pre-opened file descriptor.
623
623
fn open_parent ( p : & Path ) -> io:: Result < ( ManuallyDrop < WasiFd > , PathBuf ) > {
624
624
let p = CString :: new ( p. as_os_str ( ) . as_bytes ( ) ) ?;
625
625
unsafe {
626
626
let mut ret = ptr:: null ( ) ;
627
627
let fd = __wasilibc_find_relpath ( p. as_ptr ( ) , & mut ret) ;
628
628
if fd == -1 {
629
629
let msg = format ! (
630
- "failed to find a preopened file descriptor \
630
+ "failed to find a pre-opened file descriptor \
631
631
through which {:?} could be opened",
632
632
p
633
633
) ;
0 commit comments