Skip to content

Commit de1ef75

Browse files
committed
Auto merge of #6364 - dwijnand:test-json-parse-expect-over-unwrap, r=alexcrichton
Use expect over unwrap, for panic-in-panic aborts ... doesn't help, but it can't hurt either, right?
2 parents d27b47b + b938637 commit de1ef75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/testsuite/support/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ impl Execs {
682682
self.expect_json = Some(
683683
expected
684684
.split("\n\n")
685-
.map(|obj| obj.parse().unwrap())
685+
.map(|line| line.parse().expect("line to be a valid JSON value"))
686686
.collect(),
687687
);
688688
self

0 commit comments

Comments
 (0)