uucore: simplify splice()

This commit is contained in:
oech3
2026-04-10 15:15:21 +02:00
committed by Daniel Hofstetter
parent f9efb9e459
commit 7599b35a92
+2 -9
View File
@@ -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<usize> {
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<usize> {
rustix::pipe::splice(source, None, target, None, len, SpliceFlags::empty())
}
/// Splice wrapper which fully finishes the write.