Skip to content

Commit

Permalink
Merge pull request #268 from cakebaker/tests_fix_elided_lifetime_has_…
Browse files Browse the repository at this point in the history
…a_name_warnings

tests: fix "elided lifetime has a name" warnings
  • Loading branch information
sylvestre authored Nov 29, 2024
2 parents 6fc16fd + 13c121f commit c37005b
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 c37005b

Please sign in to comment.