Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 0 additions & 77 deletions src/uu/yes/src/splice.rs

This file was deleted.

13 changes: 0 additions & 13 deletions src/uu/yes/src/yes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@ use clap::{Arg, ArgAction, Command, builder::ValueParser};
use std::error::Error;
use std::ffi::OsString;
use std::io::{self, Write};
#[cfg(any(target_os = "linux", target_os = "android"))]
use std::os::fd::AsFd;
use uucore::error::{UResult, USimpleError};
#[cfg(unix)]
use uucore::signals::enable_pipe_errors;
use uucore::{format_usage, help_about, help_usage};
#[cfg(any(target_os = "linux", target_os = "android"))]
mod splice;

const ABOUT: &str = help_about!("yes.md");
const USAGE: &str = help_usage!("yes.md");
Expand Down Expand Up @@ -118,15 +114,6 @@ pub fn exec(bytes: &[u8]) -> io::Result<()> {
#[cfg(unix)]
enable_pipe_errors()?;

#[cfg(any(target_os = "linux", target_os = "android"))]
{
match splice::splice_data(bytes, &stdout.as_fd()) {
Ok(_) => return Ok(()),
Err(splice::Error::Io(err)) => return Err(err),
Err(splice::Error::Unsupported) => (),
}
}

loop {
stdout.write_all(bytes)?;
}
Expand Down
Loading