MCPcopy Index your code
hub / github.com/assert-rs/assert_cmd / try_interrupted

Method try_interrupted

src/assert.rs:221–226  ·  view source on GitHub ↗

Variant of [`Assert::interrupted`] that returns an [`AssertResult`].

(self)

Source from the content-addressed store, hash-verified

219
220 /// Variant of [`Assert::interrupted`] that returns an [`AssertResult`].
221 pub fn try_interrupted(self) -> AssertResult {
222 if self.output.status.code().is_some() {
223 return Err(self.into_error(AssertReason::UnexpectedCompletion));
224 }
225 Ok(self)
226 }
227
228 /// Ensure the command returned the expected code.
229 ///

Callers 1

interruptedMethod · 0.80

Calls 2

codeMethod · 0.80
into_errorMethod · 0.80

Tested by

no test coverage detected