Skip to content

Commit b178512

Browse files
committed
refactor(buf_copy): remove unused code
1 parent 6b8a5a1 commit b178512

3 files changed

Lines changed: 0 additions & 45 deletions

File tree

src/uucore/src/lib/features/buf_copy.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
//! used by utilities to work around the limitations of Rust's `fs::copy` which
1010
//! does not handle copying special files (e.g pipes, character/block devices).
1111
12-
pub mod common;
13-
1412
#[cfg(any(target_os = "linux", target_os = "android"))]
1513
pub mod linux;
1614
#[cfg(any(target_os = "linux", target_os = "android"))]

src/uucore/src/lib/features/buf_copy/common.rs

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/uucore/src/lib/features/buf_copy/linux.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ use std::{
1313
os::fd::{AsFd, AsRawFd},
1414
};
1515

16-
use super::common::Error;
17-
1816
/// A readable file descriptor.
1917
pub trait FdReadable: Read + AsRawFd + AsFd {}
2018

@@ -25,13 +23,6 @@ pub trait FdWritable: Write + AsFd + AsRawFd {}
2523

2624
impl<T> FdWritable for T where T: Write + AsFd + AsRawFd {}
2725

28-
/// Conversion from a `rustix::io::Errno` into our `Error` which implements `UError`.
29-
impl From<rustix::io::Errno> for Error {
30-
fn from(error: rustix::io::Errno) -> Self {
31-
Self::Io(std::io::Error::from(error))
32-
}
33-
}
34-
3526
/// Copy data from `Read` implementor `source` into a `Write` implementor
3627
/// `dest`. This works by reading a chunk of data from `source` and writing the
3728
/// data to `dest` in a loop.

0 commit comments

Comments
 (0)