We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bf907d commit c784046Copy full SHA for c784046
1 file changed
src/uu/od/src/multifile_reader.rs
@@ -56,10 +56,12 @@ impl MultifileReader<'_> {
56
// limit.
57
#[cfg(any(unix, target_os = "wasi"))]
58
{
59
- struct RawReader<'a>(rustix::fd::BorrowedFd<'a>);
60
- impl io::Read for RawReader<'_> {
+ use std::os::fd::AsFd;
+ // todo: definition is generic enough to move to uucore::io::RawReader if useful
61
+ struct RawReader<T: AsFd>(pub T);
62
+ impl<T: AsFd> io::Read for RawReader<T> {
63
fn read(&mut self, b: &mut [u8]) -> io::Result<usize> {
- rustix::io::read(self.0, b).map_err(Into::into)
64
+ rustix::io::read(&self.0, b).map_err(Into::into)
65
}
66
67
let stdin = RawReader(rustix::stdio::stdin());
0 commit comments