Skip to content

Commit c37005b

Browse files
authored
Merge pull request #268 from cakebaker/tests_fix_elided_lifetime_has_a_name_warnings
tests: fix "elided lifetime has a name" warnings
2 parents 6fc16fd + 13c121f commit c37005b

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
@@ -171,7 +171,7 @@ impl CmdResult {
171171

172172
/// Assert `stdout` as bytes with a predicate function returning a `bool`.
173173
#[track_caller]
174-
pub fn stdout_check<'a, F>(&'a self, predicate: F) -> &Self
174+
pub fn stdout_check<'a, F>(&'a self, predicate: F) -> &'a Self
175175
where
176176
F: Fn(&'a [u8]) -> bool,
177177
{
@@ -186,7 +186,7 @@ impl CmdResult {
186186

187187
/// Assert `stdout` as `&str` with a predicate function returning a `bool`.
188188
#[track_caller]
189-
pub fn stdout_str_check<'a, F>(&'a self, predicate: F) -> &Self
189+
pub fn stdout_str_check<'a, F>(&'a self, predicate: F) -> &'a Self
190190
where
191191
F: Fn(&'a str) -> bool,
192192
{
@@ -201,7 +201,7 @@ impl CmdResult {
201201

202202
/// Assert `stderr` as bytes with a predicate function returning a `bool`.
203203
#[track_caller]
204-
pub fn stderr_check<'a, F>(&'a self, predicate: F) -> &Self
204+
pub fn stderr_check<'a, F>(&'a self, predicate: F) -> &'a Self
205205
where
206206
F: Fn(&'a [u8]) -> bool,
207207
{
@@ -216,7 +216,7 @@ impl CmdResult {
216216

217217
/// Assert `stderr` as `&str` with a predicate function returning a `bool`.
218218
#[track_caller]
219-
pub fn stderr_str_check<'a, F>(&'a self, predicate: F) -> &Self
219+
pub fn stderr_str_check<'a, F>(&'a self, predicate: F) -> &'a Self
220220
where
221221
F: Fn(&'a str) -> bool,
222222
{

0 commit comments

Comments
 (0)