From 2427fc6b1c1fd7420bc83f7f32fe9a9c38fb09dd Mon Sep 17 00:00:00 2001 From: Alessandro Fulgini Date: Fri, 4 Aug 2023 20:01:28 +0200 Subject: [PATCH] fix(rofi): derive Default trait for IconMode --- src/rofi.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/rofi.rs b/src/rofi.rs index 7f51583..b11c5ac 100644 --- a/src/rofi.rs +++ b/src/rofi.rs @@ -17,22 +17,17 @@ const ENV_ICON_FONT: &str = "ROFI_VSCODE_ICON_FONT"; const ENV_ICON_COLOR: &str = "ROFI_VSCODE_ICON_COLOR"; /// How to show icons next to items -#[derive(Debug)] +#[derive(Debug, Default)] pub enum IconMode { /// No icons (default) None, /// From current icon theme + #[default] Theme, /// From the given nerd font Nerd, } -impl Default for IconMode { - fn default() -> Self { - IconMode::Theme - } -} - /// Configuration for the icons #[derive(Debug)] pub struct IconConfig {