We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6c348f commit aec402bCopy full SHA for aec402b
src/tools/run-make-support/src/command.rs
@@ -127,14 +127,14 @@ impl CompletedProcess {
127
128
#[track_caller]
129
pub fn assert_stderr_contains<S: AsRef<str>>(self, needle: S) -> Self {
130
+ let needle_str = needle.as_ref();
131
+ let stderr_str = self.stderr_utf8().as_str();
132
+
133
assert!(
- self.stderr_utf8().contains(needle.as_ref()),
- format!(
- "The stderr {} did not contain the string {}",
134
- self.stderr_utf8().as_str(),
135
- needle.as_ref(),
136
- )
+ self.stderr_utf8().contains(needle_str),
+ format!("The stderr \"{}\" did not contain the string \"{}\"", stderr_str, needle_str)
137
);
138
self
139
}
140
0 commit comments