From 93f5172daad5c9eea77f34846c30a98961c694f6 Mon Sep 17 00:00:00 2001 From: Ferdinand Schober Date: Sat, 15 Mar 2025 00:31:37 +0100 Subject: [PATCH] fix clippy --- lan-mouse-gtk/src/window.rs | 6 ++---- src/config.rs | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lan-mouse-gtk/src/window.rs b/lan-mouse-gtk/src/window.rs index d155b5c..3eef58b 100644 --- a/lan-mouse-gtk/src/window.rs +++ b/lan-mouse-gtk/src/window.rs @@ -356,14 +356,12 @@ impl Window { fn client_object_for_handle(&self, handle: ClientHandle) -> Option { self.client_idx(handle) - .map(|i| self.client_by_idx(i as u32)) - .flatten() + .and_then(|i| self.client_by_idx(i as u32)) } fn row_for_handle(&self, handle: ClientHandle) -> Option { self.client_idx(handle) - .map(|i| self.row_by_idx(i as i32)) - .flatten() + .and_then(|i| self.row_by_idx(i as i32)) } fn update_dns_state(&self, handle: ClientHandle, resolved: bool) { diff --git a/src/config.rs b/src/config.rs index 9cfccd3..95305c7 100644 --- a/src/config.rs +++ b/src/config.rs @@ -38,7 +38,6 @@ pub struct ConfigToml { #[derive(Serialize, Deserialize, Debug, Eq, PartialEq)] pub struct TomlClient { - pub capture_backend: Option, pub hostname: Option, pub host_name: Option, pub ips: Option>,