From 7599b35a920e403e4b0c78a3b1bc3d25fccaeea3 Mon Sep 17 00:00:00 2001 From: oech3 <> Date: Fri, 10 Apr 2026 18:40:48 +0900 Subject: [PATCH] uucore: simplify splice() --- src/uucore/src/lib/features/pipes.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/uucore/src/lib/features/pipes.rs b/src/uucore/src/lib/features/pipes.rs index 75941059b..8d5800cf9 100644 --- a/src/uucore/src/lib/features/pipes.rs +++ b/src/uucore/src/lib/features/pipes.rs @@ -41,15 +41,8 @@ pub fn pipe() -> std::io::Result<(File, File)> { /// this is still very efficient. #[inline] #[cfg(any(target_os = "linux", target_os = "android"))] -pub fn splice(source: &impl AsFd, target: &impl AsFd, len: usize) -> std::io::Result { - Ok(rustix::pipe::splice( - source, - None, - target, - None, - len, - SpliceFlags::empty(), - )?) +pub fn splice(source: &impl AsFd, target: &impl AsFd, len: usize) -> rustix::io::Result { + rustix::pipe::splice(source, None, target, None, len, SpliceFlags::empty()) } /// Splice wrapper which fully finishes the write.