Skip to content

Commit a262da4

Browse files
authored
Merge pull request #148 from cakebaker/test_util_fix_elided_lifetime_has_a_name_warnings
tests: fix "elided lifetime has a name" warnings
2 parents 3796f79 + 2df3084 commit a262da4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/common/util.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ impl CmdResult {
176176

177177
/// Assert `stdout` as bytes with a predicate function returning a `bool`.
178178
#[track_caller]
179-
pub fn stdout_check<'a, F>(&'a self, predicate: F) -> &Self
179+
pub fn stdout_check<'a, F>(&'a self, predicate: F) -> &'a Self
180180
where
181181
F: Fn(&'a [u8]) -> bool,
182182
{
@@ -191,7 +191,7 @@ impl CmdResult {
191191

192192
/// Assert `stdout` as `&str` with a predicate function returning a `bool`.
193193
#[track_caller]
194-
pub fn stdout_str_check<'a, F>(&'a self, predicate: F) -> &Self
194+
pub fn stdout_str_check<'a, F>(&'a self, predicate: F) -> &'a Self
195195
where
196196
F: Fn(&'a str) -> bool,
197197
{
@@ -206,7 +206,7 @@ impl CmdResult {
206206

207207
/// Assert `stderr` as bytes with a predicate function returning a `bool`.
208208
#[track_caller]
209-
pub fn stderr_check<'a, F>(&'a self, predicate: F) -> &Self
209+
pub fn stderr_check<'a, F>(&'a self, predicate: F) -> &'a Self
210210
where
211211
F: Fn(&'a [u8]) -> bool,
212212
{
@@ -221,7 +221,7 @@ impl CmdResult {
221221

222222
/// Assert `stderr` as `&str` with a predicate function returning a `bool`.
223223
#[track_caller]
224-
pub fn stderr_str_check<'a, F>(&'a self, predicate: F) -> &Self
224+
pub fn stderr_str_check<'a, F>(&'a self, predicate: F) -> &'a Self
225225
where
226226
F: Fn(&'a str) -> bool,
227227
{

0 commit comments

Comments
 (0)