Skip to content

Commit 8c21920

Browse files
committed
std: make internal-only items pub(crate)
This works around a weird problem that looks like a bug in the `exported_private_dependencies` lint.
1 parent 2e52f4d commit 8c21920

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

library/std/src/sys/wasi/fd.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl WasiFd {
9696
unsafe { wasi::fd_sync(self.as_raw_fd() as wasi::Fd).map_err(err2io) }
9797
}
9898

99-
pub fn advise(&self, offset: u64, len: u64, advice: wasi::Advice) -> io::Result<()> {
99+
pub(crate) fn advise(&self, offset: u64, len: u64, advice: wasi::Advice) -> io::Result<()> {
100100
unsafe {
101101
wasi::fd_advise(self.as_raw_fd() as wasi::Fd, offset, len, advice).map_err(err2io)
102102
}
@@ -179,7 +179,7 @@ impl WasiFd {
179179
}
180180
}
181181

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

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

202-
pub fn path_filestat_get(
202+
pub(crate) fn path_filestat_get(
203203
&self,
204204
flags: wasi::Lookupflags,
205205
path: &str,

library/std/src/sys/wasi/fs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl FileAttr {
104104
Ok(SystemTime::from_wasi_timestamp(self.meta.ctim))
105105
}
106106

107-
pub fn as_wasi(&self) -> &wasi::Filestat {
107+
pub(crate) fn as_wasi(&self) -> &wasi::Filestat {
108108
&self.meta
109109
}
110110
}
@@ -142,7 +142,7 @@ impl FileType {
142142
self.bits == wasi::FILETYPE_SYMBOLIC_LINK
143143
}
144144

145-
pub fn bits(&self) -> wasi::Filetype {
145+
pub(crate) fn bits(&self) -> wasi::Filetype {
146146
self.bits
147147
}
148148
}

0 commit comments

Comments
 (0)