Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
hide unused exports on other platforms
  • Loading branch information
the8472 committed Nov 13, 2020
commit 5eb88fa5c72d0f9b5abe106881f2c5ffba9b073d
4 changes: 1 addition & 3 deletions library/std/src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions library/std/src/io/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions library/std/src/sys/unix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
Expand Down Expand Up @@ -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),
}
Expand Down