File tree Expand file tree Collapse file tree
src/uucore/src/lib/features/buf_copy Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,19 +10,9 @@ use crate::error::UResult;
1010/// Buffer-based copying utilities for unix (excluding Linux).
1111use std:: {
1212 io:: { Read , Write } ,
13- os:: fd:: { AsFd , AsRawFd } ,
13+ os:: fd:: AsFd ,
1414} ;
1515
16- /// A readable file descriptor.
17- pub trait FdReadable : Read + AsRawFd + AsFd { }
18-
19- impl < T > FdReadable for T where T : Read + AsFd + AsRawFd { }
20-
21- /// A writable file descriptor.
22- pub trait FdWritable : Write + AsFd + AsRawFd { }
23-
24- impl < T > FdWritable for T where T : Write + AsFd + AsRawFd { }
25-
2616/// Copy data from `Read` implementor `source` into a `Write` implementor
2717/// `dest`. This works by reading a chunk of data from `source` and writing the
2818/// data to `dest` in a loop.
@@ -36,8 +26,8 @@ impl<T> FdWritable for T where T: Write + AsFd + AsRawFd {}
3626/// * `dest` - `Write` implementor to copy data to.
3727pub fn copy_stream < R , S > ( src : & mut R , dest : & mut S ) -> UResult < ( ) >
3828where
39- R : Read + AsFd + AsRawFd ,
40- S : Write + AsFd + AsRawFd ,
29+ R : Read + AsFd ,
30+ S : Write + AsFd ,
4131{
4232 // If we're on Linux or Android, try to use the splice() system call
4333 // for faster writing. If it works, we're done.
You can’t perform that action at this time.
0 commit comments