Skip to content

Commit 1ff061a

Browse files
committed
Use question mark
1 parent e55065e commit 1ff061a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/formatting.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,7 @@ fn should_skip_module<T: FormatHandler>(
9191
}
9292

9393
fn echo_back_stdin(input: &str) -> Result<FormatReport, ErrorKind> {
94-
if let Err(e) = io::stdout().write_all(input.as_bytes()) {
95-
return Err(From::from(e));
96-
}
94+
io::stdout().write_all(input.as_bytes())?;
9795
Ok(FormatReport::new())
9896
}
9997

src/test/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,8 @@ fn idempotent_check(
751751

752752
let target = sig_comments.get("target").map(|x| &(*x)[..]);
753753

754-
handle_result(write_result, target).map(|_| format_report)
754+
handle_result(write_result, target)?;
755+
Ok(format_report)
755756
}
756757

757758
// Reads test config file using the supplied (optional) file name. If there's no file name or the

0 commit comments

Comments
 (0)