Skip to content

Commit 2cfb6a0

Browse files
committed
remove unused import
1 parent def380d commit 2cfb6a0

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/uu/cat/src/splice.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// file that was distributed with this source code.
55
use super::{CatResult, FdReadable, InputHandle};
66

7-
use std::io::Write;
87
use std::os::{fd::AsFd, unix::io::AsRawFd};
98

109
use uucore::pipes::{MAX_ROOTLESS_PIPE_SIZE, might_fuse, splice};
@@ -17,7 +16,7 @@ use uucore::pipes::{MAX_ROOTLESS_PIPE_SIZE, might_fuse, splice};
1716
/// The `bool` in the result value indicates if we need to fall back to normal
1817
/// copying or not. False means we don't have to.
1918
#[inline]
20-
pub(super) fn write_fast_using_splice<R: FdReadable, S: AsRawFd + AsFd + Write>(
19+
pub(super) fn write_fast_using_splice<R: FdReadable, S: AsRawFd + AsFd>(
2120
handle: &InputHandle<R>,
2221
write_fd: &mut S,
2322
) -> CatResult<bool> {

src/uucore/src/lib/features/pipes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pub fn might_fuse(source: &impl AsFd) -> bool {
9797
pub fn splice_unbounded<R, S>(source: &R, dest: &mut S) -> std::io::Result<bool>
9898
where
9999
R: Read + AsFd,
100-
S: AsFd + Write,
100+
S: AsFd,
101101
{
102102
// improve throughput
103103
// todo: avoid fcntl overhead for small input, but don't fcntl inside of the loop
@@ -123,7 +123,7 @@ where
123123
pub fn splice_unbounded_broker<R, S>(source: &R, dest: &mut S) -> std::io::Result<bool>
124124
where
125125
R: Read + AsFd,
126-
S: AsFd + Write,
126+
S: AsFd,
127127
{
128128
static PIPE_CACHE: OnceLock<Option<(File, File)>> = OnceLock::new();
129129
let Some((pipe_rd, pipe_wr)) = PIPE_CACHE.get_or_init(|| pipe().ok()).as_ref() else {

0 commit comments

Comments
 (0)