hide unused exports on other platforms
This commit is contained in:
parent
16236470c1
commit
5eb88fa5c7
@ -283,10 +283,8 @@ pub use self::stdio::{set_panic, set_print};
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use self::util::{empty, repeat, sink, Empty, Repeat, Sink};
|
||||
|
||||
pub(crate) use self::copy::generic_copy;
|
||||
|
||||
mod buffered;
|
||||
mod copy;
|
||||
pub(crate) mod copy;
|
||||
mod cursor;
|
||||
mod error;
|
||||
mod impls;
|
||||
|
@ -409,6 +409,8 @@ impl Read for Stdin {
|
||||
}
|
||||
}
|
||||
|
||||
// only used by platform-dependent io::copy specializations, i.e. unused on some platforms
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
impl StdinLock<'_> {
|
||||
pub(crate) fn as_mut_buf(&mut self) -> &mut BufReader<impl Read> {
|
||||
&mut self.inner
|
||||
|
@ -1276,7 +1276,7 @@ pub(crate) fn copy_regular_files(
|
||||
// - copy_file_range is disallowed, for example by seccomp (EPERM)
|
||||
// - copy_file_range cannot be used with pipes or device nodes (EINVAL)
|
||||
assert_eq!(written, 0);
|
||||
return io::generic_copy(reader, writer);
|
||||
return io::copy::generic_copy(reader, writer);
|
||||
}
|
||||
_ => return Err(err),
|
||||
}
|
||||
@ -1328,7 +1328,7 @@ pub(crate) fn sendfile_splice(
|
||||
// Try fallback io::copy if splice/sendfile do not support this particular
|
||||
// file descritor (EINVAL)
|
||||
assert_eq!(written, 0);
|
||||
return io::generic_copy(reader, writer);
|
||||
return io::copy::generic_copy(reader, writer);
|
||||
}
|
||||
_ => return Err(err),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user