mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
refactor(more): avoid Box<dyn Write>
This commit is contained in:
committed by
Daniel Hofstetter
parent
36595414b4
commit
3b2ff61d21
@@ -337,7 +337,7 @@ impl InputType {
|
||||
|
||||
enum OutputType {
|
||||
Tty(Stdout),
|
||||
Pipe(Box<dyn Write>),
|
||||
Pipe(Stdout),
|
||||
#[cfg(test)]
|
||||
Test(Vec<u8>),
|
||||
}
|
||||
@@ -375,7 +375,7 @@ fn setup_term() -> UResult<OutputType> {
|
||||
stdout.execute(EnterAlternateScreen)?.execute(Hide)?;
|
||||
Ok(OutputType::Tty(stdout))
|
||||
} else {
|
||||
Ok(OutputType::Pipe(Box::new(stdout)))
|
||||
Ok(OutputType::Pipe(stdout))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ fn setup_term() -> UResult<OutputType> {
|
||||
#[inline(always)]
|
||||
fn setup_term() -> UResult<OutputType> {
|
||||
// no real stdout/tty on Fuchsia, just write into a pipe
|
||||
Ok(OutputType::Pipe(Box::new(stdout())))
|
||||
Ok(OutputType::Pipe(stdout()))
|
||||
}
|
||||
|
||||
fn reset_term() -> UResult<()> {
|
||||
|
||||
Reference in New Issue
Block a user