Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/assert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ pub trait OutputAssertExt {
/// ```
///
/// [`Output`]: std::process::Output
#[must_use]
fn assert(self) -> Assert;
}

Expand Down Expand Up @@ -95,6 +96,7 @@ impl Assert {
/// Create an `Assert` for a given [`Output`].
///
/// [`Output`]: std::process::Output
#[must_use]
pub fn new(output: process::Output) -> Self {
Self {
output,
Expand Down Expand Up @@ -124,6 +126,7 @@ impl Assert {
/// .append_context("main", "no args")
/// .success();
/// ```
#[must_use]
pub fn append_context<D>(mut self, name: &'static str, context: D) -> Self
where
D: fmt::Display + Send + Sync + 'static,
Expand Down
1 change: 1 addition & 0 deletions src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ impl Command {
/// ```
///
/// [`Output`]: std::process::Output
#[must_use]
pub fn assert(&mut self) -> Assert {
OutputAssertExt::assert(self)
}
Expand Down