mirror of
https://github.com/uutils/coreutils
synced 2024-10-15 04:14:44 +00:00
refactor/tee ~ polish spelling (comments, names, and exceptions)
This commit is contained in:
parent
879ac263bd
commit
b1a2f6e044
|
@ -119,7 +119,7 @@ fn tee(options: Options) -> Result<()> {
|
||||||
|
|
||||||
// TODO: replaced generic 'copy' call to be able to stop copying
|
// TODO: replaced generic 'copy' call to be able to stop copying
|
||||||
// if all outputs are closed (due to errors)
|
// if all outputs are closed (due to errors)
|
||||||
if copy(input, &mut output).is_err() || output.flush().is_err() || output.error_occured() {
|
if copy(input, &mut output).is_err() || output.flush().is_err() || output.error_occurred() {
|
||||||
Err(Error::new(ErrorKind::Other, ""))
|
Err(Error::new(ErrorKind::Other, ""))
|
||||||
} else {
|
} else {
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -155,7 +155,7 @@ impl MultiWriter {
|
||||||
writers,
|
writers,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fn error_occured(&self) -> bool {
|
fn error_occurred(&self) -> bool {
|
||||||
self.writers.len() != self.initial_len
|
self.writers.len() != self.initial_len
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue