Skip to content

Commit 3be34cb

Browse files
committed
Remove "Expected: execs" from testsuite error.
That message was not helpful.
1 parent 0f304ca commit 3be34cb

File tree

1 file changed

+4
-10
lines changed
  • crates/cargo-test-support/src

1 file changed

+4
-10
lines changed

crates/cargo-test-support/src/lib.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
use std::env;
1010
use std::ffi::OsStr;
11-
use std::fmt;
1211
use std::fs;
1312
use std::os;
1413
use std::path::{Path, PathBuf};
@@ -725,15 +724,15 @@ impl Execs {
725724
self.ran = true;
726725
let p = (&self.process_builder).clone().unwrap();
727726
if let Err(e) = self.match_process(&p) {
728-
panic!("\nExpected: {:?}\n but: {}", self, e)
727+
panic!("\n{}", e)
729728
}
730729
}
731730

732731
#[track_caller]
733732
pub fn run_output(&mut self, output: &Output) {
734733
self.ran = true;
735734
if let Err(e) = self.match_output(output) {
736-
panic!("\nExpected: {:?}\n but: {}", self, e)
735+
panic!("\n{}", e)
737736
}
738737
}
739738

@@ -1006,10 +1005,11 @@ impl Execs {
10061005
Ok(())
10071006
} else {
10081007
bail!(
1009-
"differences:\n\
1008+
"{} did not match:\n\
10101009
{}\n\n\
10111010
other output:\n\
10121011
`{}`",
1012+
description,
10131013
diffs.join("\n"),
10141014
String::from_utf8_lossy(extra)
10151015
)
@@ -1404,12 +1404,6 @@ fn zip_all<T, I1: Iterator<Item = T>, I2: Iterator<Item = T>>(a: I1, b: I2) -> Z
14041404
}
14051405
}
14061406

1407-
impl fmt::Debug for Execs {
1408-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1409-
write!(f, "execs")
1410-
}
1411-
}
1412-
14131407
pub fn execs() -> Execs {
14141408
Execs {
14151409
ran: false,

0 commit comments

Comments
 (0)