From 903f7812b6fa8903c5ebdfc760d91e03be884193 Mon Sep 17 00:00:00 2001 From: oech3 <> Date: Sun, 17 May 2026 12:12:31 +0900 Subject: [PATCH] buf_copy/linux.rs: drop unused trait --- src/uucore/src/lib/features/buf_copy/linux.rs | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/uucore/src/lib/features/buf_copy/linux.rs b/src/uucore/src/lib/features/buf_copy/linux.rs index 0af494754b5..df1f33416f7 100644 --- a/src/uucore/src/lib/features/buf_copy/linux.rs +++ b/src/uucore/src/lib/features/buf_copy/linux.rs @@ -10,19 +10,9 @@ use crate::error::UResult; /// Buffer-based copying utilities for unix (excluding Linux). use std::{ io::{Read, Write}, - os::fd::{AsFd, AsRawFd}, + os::fd::AsFd, }; -/// A readable file descriptor. -pub trait FdReadable: Read + AsRawFd + AsFd {} - -impl FdReadable for T where T: Read + AsFd + AsRawFd {} - -/// A writable file descriptor. -pub trait FdWritable: Write + AsFd + AsRawFd {} - -impl FdWritable for T where T: Write + AsFd + AsRawFd {} - /// Copy data from `Read` implementor `source` into a `Write` implementor /// `dest`. This works by reading a chunk of data from `source` and writing the /// data to `dest` in a loop. @@ -36,8 +26,8 @@ impl FdWritable for T where T: Write + AsFd + AsRawFd {} /// * `dest` - `Write` implementor to copy data to. pub fn copy_stream(src: &mut R, dest: &mut S) -> UResult<()> where - R: Read + AsFd + AsRawFd, - S: Write + AsFd + AsRawFd, + R: Read + AsFd, + S: Write + AsFd, { // If we're on Linux or Android, try to use the splice() system call // for faster writing. If it works, we're done.