Skip to content

Commit

Permalink
std: make internal-only items pub(crate)
Browse files Browse the repository at this point in the history
This works around a weird problem that looks like a bug in the
`exported_private_dependencies` lint.
  • Loading branch information
notriddle committed May 25, 2023
1 parent 2e52f4d commit 8c21920
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions library/std/src/sys/wasi/fd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl WasiFd {
unsafe { wasi::fd_sync(self.as_raw_fd() as wasi::Fd).map_err(err2io) }
}

pub fn advise(&self, offset: u64, len: u64, advice: wasi::Advice) -> io::Result<()> {
pub(crate) fn advise(&self, offset: u64, len: u64, advice: wasi::Advice) -> io::Result<()> {
unsafe {
wasi::fd_advise(self.as_raw_fd() as wasi::Fd, offset, len, advice).map_err(err2io)
}
Expand Down Expand Up @@ -179,7 +179,7 @@ impl WasiFd {
}
}

pub fn filestat_get(&self) -> io::Result<wasi::Filestat> {
pub(crate) fn filestat_get(&self) -> io::Result<wasi::Filestat> {
unsafe { wasi::fd_filestat_get(self.as_raw_fd() as wasi::Fd).map_err(err2io) }
}

Expand All @@ -199,7 +199,7 @@ impl WasiFd {
unsafe { wasi::fd_filestat_set_size(self.as_raw_fd() as wasi::Fd, size).map_err(err2io) }
}

pub fn path_filestat_get(
pub(crate) fn path_filestat_get(
&self,
flags: wasi::Lookupflags,
path: &str,
Expand Down
4 changes: 2 additions & 2 deletions library/std/src/sys/wasi/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl FileAttr {
Ok(SystemTime::from_wasi_timestamp(self.meta.ctim))
}

pub fn as_wasi(&self) -> &wasi::Filestat {
pub(crate) fn as_wasi(&self) -> &wasi::Filestat {
&self.meta
}
}
Expand Down Expand Up @@ -142,7 +142,7 @@ impl FileType {
self.bits == wasi::FILETYPE_SYMBOLIC_LINK
}

pub fn bits(&self) -> wasi::Filetype {
pub(crate) fn bits(&self) -> wasi::Filetype {
self.bits
}
}
Expand Down

0 comments on commit 8c21920

Please sign in to comment.