Skip to content

ui: buttons: fix clippy warning about confusing lifetimes #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hnez
Copy link
Member

@hnez hnez commented Aug 8, 2025

This feels like something where clippy suggested the exact opposite in the past, but I am not in the mood to argue.

Fixes the following warnings:

 error: hiding a lifetime that's elided elsewhere is confusing
  --> src/ui/buttons.rs:41:29
   |
41 |         pub fn fetch_events(&mut self) -> Result<FetchEventsSynced, ()> {
   |                             ^^^^^^^^^            ----------------- the same lifetime is hidden here
   |                             |
   |                             the lifetime is elided here
   |
   = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
   = note: `-D mismatched-lifetime-syntaxes` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(mismatched_lifetime_syntaxes)]`
help: use `'_` for type paths
   |
41 |         pub fn fetch_events(&mut self) -> Result<FetchEventsSynced<'_>, ()> {
   |                                                                   ++++

This fixes the failed scheduled CI runs.

This feels like something where clippy suggested the exact opposite in the
past, but I am not in the mood to argue.

Fixes the following warnings:

     error: hiding a lifetime that's elided elsewhere is confusing
      --> src/ui/buttons.rs:41:29
       |
    41 |         pub fn fetch_events(&mut self) -> Result<FetchEventsSynced, ()> {
       |                             ^^^^^^^^^            ----------------- the same lifetime is hidden here
       |                             |
       |                             the lifetime is elided here
       |
       = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
       = note: `-D mismatched-lifetime-syntaxes` implied by `-D warnings`
       = help: to override `-D warnings` add `#[allow(mismatched_lifetime_syntaxes)]`
    help: use `'_` for type paths
       |
    41 |         pub fn fetch_events(&mut self) -> Result<FetchEventsSynced<'_>, ()> {
       |                                                                   ++++

Signed-off-by: Leonard Göhrs <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants