Merge pull request from cakebaker/test_util_fix_elided_lifetime_has_a_name_warnings

tests: fix "elided lifetime has a name" warnings
This commit is contained in:
Sylvestre Ledru
2024-11-08 15:46:41 +01:00
committed by GitHub

@ -176,7 +176,7 @@ impl CmdResult {
/// Assert `stdout` as bytes with a predicate function returning a `bool`. /// Assert `stdout` as bytes with a predicate function returning a `bool`.
#[track_caller] #[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 where
F: Fn(&'a [u8]) -> bool, F: Fn(&'a [u8]) -> bool,
{ {
@ -191,7 +191,7 @@ impl CmdResult {
/// Assert `stdout` as `&str` with a predicate function returning a `bool`. /// Assert `stdout` as `&str` with a predicate function returning a `bool`.
#[track_caller] #[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 where
F: Fn(&'a str) -> bool, F: Fn(&'a str) -> bool,
{ {
@ -206,7 +206,7 @@ impl CmdResult {
/// Assert `stderr` as bytes with a predicate function returning a `bool`. /// Assert `stderr` as bytes with a predicate function returning a `bool`.
#[track_caller] #[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 where
F: Fn(&'a [u8]) -> bool, F: Fn(&'a [u8]) -> bool,
{ {
@ -221,7 +221,7 @@ impl CmdResult {
/// Assert `stderr` as `&str` with a predicate function returning a `bool`. /// Assert `stderr` as `&str` with a predicate function returning a `bool`.
#[track_caller] #[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 where
F: Fn(&'a str) -> bool, F: Fn(&'a str) -> bool,
{ {