From b7188bac25a9ec55c85c193bc427382e6e278649 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Fri, 21 Jun 2024 14:12:07 -0700 Subject: [PATCH] fix some clippy warnings Signed-off-by: William Casarin --- src/colors.rs | 8 ++++---- src/timeline.rs | 6 +----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/colors.rs b/src/colors.rs index e2f8b2c8..e8300cdf 100644 --- a/src/colors.rs +++ b/src/colors.rs @@ -8,7 +8,7 @@ pub const PINK: Color32 = Color32::from_rgb(0xE4, 0x5A, 0xC9); pub const GRAY_SECONDARY: Color32 = Color32::from_rgb(0x8A, 0x8A, 0x8A); const BLACK: Color32 = Color32::from_rgb(0x00, 0x00, 0x00); const RED_700: Color32 = Color32::from_rgb(0xC7, 0x37, 0x5A); -const ORANGE_700: Color32 = Color32::from_rgb(0xF6, 0xB1, 0x4A); +//const ORANGE_700: Color32 = Color32::from_rgb(0xF6, 0xB1, 0x4A); // BACKGROUNDS const SEMI_DARKER_BG: Color32 = Color32::from_rgb(0x39, 0x39, 0x39); @@ -29,7 +29,7 @@ pub struct ColorTheme { pub extreme_bg_color: Color32, pub text_color: Color32, pub err_fg_color: Color32, - pub warn_fg_color: Color32, + //pub warn_fg_color: Color32, pub hyperlink_color: Color32, pub selection_color: Color32, @@ -56,7 +56,7 @@ pub fn desktop_dark_color_theme() -> ColorTheme { extreme_bg_color: DARK_ISH_BG, text_color: Color32::WHITE, err_fg_color: RED_700, - warn_fg_color: ORANGE_700, + //warn_fg_color: ORANGE_700, hyperlink_color: PURPLE, selection_color: PURPLE_ALT, @@ -92,7 +92,7 @@ pub fn light_color_theme() -> ColorTheme { extreme_bg_color: LIGHTER_GRAY, text_color: BLACK, err_fg_color: RED_700, - warn_fg_color: ORANGE_700, + //warn_fg_color: ORANGE_700, hyperlink_color: PURPLE, selection_color: PURPLE_ALT, diff --git a/src/timeline.rs b/src/timeline.rs index 8da106c9..353092a8 100644 --- a/src/timeline.rs +++ b/src/timeline.rs @@ -225,11 +225,7 @@ fn tabs_ui(timeline: &mut Timeline, ui: &mut egui::Ui) { //ui.add_space(0.5); ui::hline(ui); - let sel = if let Some(sel) = tab_res.selected() { - sel - } else { - 0 - }; + let sel = tab_res.selected().unwrap_or_default(); // fun animation timeline.selected_view = sel;