Skip to content

Commit

Permalink
tests: fix "elided lifetime has a name" warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cakebaker committed Nov 12, 2024
1 parent 087d37c commit 2cdcce4
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 2cdcce4

Please sign in to comment.