1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-17 13:27:49 +00:00

cat: adapt to API changes of uucore/pipes

This commit is contained in:
Daniel Hofstetter 2024-08-14 17:15:53 +02:00
parent 612ae271d3
commit 5342bae38d

View file

@ -13,7 +13,7 @@ use uucore::error::UResult;
use uucore::fs::FileInformation;
#[cfg(unix)]
use std::os::unix::io::AsRawFd;
use std::os::fd::{AsFd, AsRawFd};
/// Linux splice support
#[cfg(any(target_os = "linux", target_os = "android"))]
@ -125,12 +125,12 @@ struct OutputState {
}
#[cfg(unix)]
trait FdReadable: Read + AsRawFd {}
trait FdReadable: Read + AsFd + AsRawFd {}
#[cfg(not(unix))]
trait FdReadable: Read {}
#[cfg(unix)]
impl<T> FdReadable for T where T: Read + AsRawFd {}
impl<T> FdReadable for T where T: Read + AsFd + AsRawFd {}
#[cfg(not(unix))]
impl<T> FdReadable for T where T: Read {}