Skip to content

Commit

Permalink
Fix elided_named_lifetimes warning
Browse files Browse the repository at this point in the history
Rustc nightly started warning e.g.:

```
  --> x11rb-async/src/connection.rs:70:30
   |
67 |     fn send_trait_request_with_reply<'this, 'req, 'future, R>(
   |                                      ----- lifetime `'this` declared here
...
70 |     ) -> Fut<'future, Cookie<'_, Self, R::Reply>, ConnectionError>
   |                              ^^ this elided lifetime gets resolved as `'this`
   |
   = note: `#[warn(elided_named_lifetimes)]` on by default
```

Signed-off-by: Uli Schlachter <psychon@znc.in>
  • Loading branch information
psychon committed Nov 23, 2024
1 parent 623d9d3 commit 3a5a7fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x11rb-async/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub trait RequestConnection: Sync {
fn send_trait_request_with_reply<'this, 'req, 'future, R>(
&'this self,
request: R,
) -> Fut<'future, Cookie<'_, Self, R::Reply>, ConnectionError>
) -> Fut<'future, Cookie<'this, Self, R::Reply>, ConnectionError>
where
'this: 'future,
'req: 'future,
Expand Down Expand Up @@ -131,7 +131,7 @@ pub trait RequestConnection: Sync {
fn send_trait_request_with_reply_with_fds<'this, 'req, 'future, R>(
&'this self,
request: R,
) -> Fut<'future, CookieWithFds<'_, Self, R::Reply>, ConnectionError>
) -> Fut<'future, CookieWithFds<'this, Self, R::Reply>, ConnectionError>
where
'this: 'future,
'req: 'future,
Expand Down

0 comments on commit 3a5a7fe

Please sign in to comment.