[sup] Explcitly handle unhandled `Result`s in `HookOutput`.
This change removed 2 compiler warnings which are legit--the expression
`stdout_log.write_fmt(...)` could be in a failed state and needs to be
at least asserted-good (which is what we do in this commit).
@@ -740,7 +740,7 @@ impl HookOutput {
for line in BufReader::new(stdout).lines() {
if let Some(ref l) = line.ok() {
outputln!(preamble preamble_str, l);
- stdout_log.write_fmt(format_args!("{}\n", l));
+ stdout_log.write_fmt(format_args!("{}\n", l)).expect("couldn't write line");
}
}
}
@@ -748,7 +748,7 @@ impl HookOutput {
for line in BufReader::new(stderr).lines() {
if let Some(ref l) = line.ok() {
outputln!(preamble preamble_str, l);
- stderr_log.write_fmt(format_args!("{}\n", l));
+ stderr_log.write_fmt(format_args!("{}\n", l)).expect("couldn't write line");
}
}
}
