Merge pull request #6678 from samueltardieu/push-xpmyxomvywlt

tests: do not elide named lifetimes
This commit is contained in:
Daniel Hofstetter 2024-09-06 11:20:13 +02:00 committed by GitHub
commit e55214cd84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -187,7 +187,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,
{ {
@ -202,7 +202,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,
{ {
@ -217,7 +217,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,
{ {
@ -232,7 +232,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,
{ {