From aaf5e082e31ee6954d48129f8de6b6ab39c37617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonard=20G=C3=B6hrs?= Date: Fri, 8 Aug 2025 07:22:01 +0200 Subject: [PATCH] ui: buttons: fix clippy warning about confusing lifetimes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 { | ^^^^^^^^^ ----------------- 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, ()> { | ++++ Signed-off-by: Leonard Göhrs --- src/ui/buttons.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/buttons.rs b/src/ui/buttons.rs index e04e740..a5fcfcb 100644 --- a/src/ui/buttons.rs +++ b/src/ui/buttons.rs @@ -38,7 +38,7 @@ mod evd { Ok(Self {}) } - pub fn fetch_events(&mut self) -> Result { + pub fn fetch_events(&mut self) -> Result, ()> { loop { std::thread::park() }