refactor/tee ~ polish spelling (comments, names, and exceptions)

This commit is contained in:
Roy Ivy III 2021-05-30 20:41:09 -05:00
parent 879ac263bd
commit b1a2f6e044

View file

@ -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
} }
} }