Skip to content

Commit

Permalink
Merge pull request #71 from cakebaker/tests_fix_elided_lifetime_has_a…
Browse files Browse the repository at this point in the history
…_name_warnings

tests: fix "elided lifetime has a name" warnings
  • Loading branch information
sylvestre authored Nov 29, 2024
2 parents dc3be00 + 2eaa8c0 commit 5c165b6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/common/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl CmdResult {

/// Assert `stdout` as bytes with a predicate function returning a `bool`.
#[track_caller]
pub fn stdout_check<'a, F>(&'a self, predicate: F) -> &Self
pub fn stdout_check<'a, F>(&'a self, predicate: F) -> &'a Self
where
F: Fn(&'a [u8]) -> bool,
{
Expand All @@ -186,7 +186,7 @@ impl CmdResult {

/// Assert `stdout` as `&str` with a predicate function returning a `bool`.
#[track_caller]
pub fn stdout_str_check<'a, F>(&'a self, predicate: F) -> &Self
pub fn stdout_str_check<'a, F>(&'a self, predicate: F) -> &'a Self
where
F: Fn(&'a str) -> bool,
{
Expand All @@ -201,7 +201,7 @@ impl CmdResult {

/// Assert `stderr` as bytes with a predicate function returning a `bool`.
#[track_caller]
pub fn stderr_check<'a, F>(&'a self, predicate: F) -> &Self
pub fn stderr_check<'a, F>(&'a self, predicate: F) -> &'a Self
where
F: Fn(&'a [u8]) -> bool,
{
Expand All @@ -216,7 +216,7 @@ impl CmdResult {

/// Assert `stderr` as `&str` with a predicate function returning a `bool`.
#[track_caller]
pub fn stderr_str_check<'a, F>(&'a self, predicate: F) -> &Self
pub fn stderr_str_check<'a, F>(&'a self, predicate: F) -> &'a Self
where
F: Fn(&'a str) -> bool,
{
Expand Down

0 comments on commit 5c165b6

Please sign in to comment.