From 9712cd8daa16a8c61a0a378cf2f600783b74b55b Mon Sep 17 00:00:00 2001 From: Remigiusz Micielski Date: Tue, 20 Aug 2024 13:12:38 +0200 Subject: [PATCH] apply clippy --- rm-main/src/tui/components/tabs.rs | 2 +- rm-main/src/tui/tabs/torrents/rustmission_torrent.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rm-main/src/tui/components/tabs.rs b/rm-main/src/tui/components/tabs.rs index 2b112e2..d110458 100644 --- a/rm-main/src/tui/components/tabs.rs +++ b/rm-main/src/tui/components/tabs.rs @@ -68,7 +68,7 @@ impl Component for TabComponent { let tabs = if CONFIG.general.beginner_mode { ["1. Torrents", "2. Search"] } else { - ["1. Torrents", "2. Search"] + ["Torrents", "Search"] }; tabs.concat().chars().count() + divider.len() + self.tabs_list.len() diff --git a/rm-main/src/tui/tabs/torrents/rustmission_torrent.rs b/rm-main/src/tui/tabs/torrents/rustmission_torrent.rs index bf3d69a..4f4a38e 100644 --- a/rm-main/src/tui/tabs/torrents/rustmission_torrent.rs +++ b/rm-main/src/tui/tabs/torrents/rustmission_torrent.rs @@ -177,7 +177,7 @@ impl RustmissionTorrent { } } } - Header::Category => match self.categories.get(0) { + Header::Category => match self.categories.first() { Some(category) => { if let Some(config_category) = CONFIG.categories.get(category) { Cell::from(category.as_str()).fg(config_category.color) @@ -187,7 +187,7 @@ impl RustmissionTorrent { } None => Cell::default(), }, - Header::CategoryIcon => match self.categories.get(0) { + Header::CategoryIcon => match self.categories.first() { Some(category) => { if let Some(config_category) = CONFIG.categories.get(category) { Cell::from(config_category.icon.as_str()).fg(config_category.color)