From 4f3215f48e72ed36cb77efcb746db1f6adabf84f Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Sat, 10 Sep 2022 22:15:25 -0400 Subject: fix: clippy lint https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant --- style/src/theme.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'style/src') diff --git a/style/src/theme.rs b/style/src/theme.rs index 7d47f1a1..4e83758b 100644 --- a/style/src/theme.rs +++ b/style/src/theme.rs @@ -21,13 +21,13 @@ use crate::toggler; use iced_core::{Background, Color}; -#[derive(Debug, Clone, Copy, PartialEq)] +#[derive(Debug, Clone, PartialEq)] pub enum Theme { Light, Dark, Custom { - palette: Palette, - extended: Extended + palette: Box, + extended: Box, } } @@ -36,7 +36,7 @@ impl Theme { match self { Self::Light => Palette::LIGHT, Self::Dark => Palette::DARK, - Self::Custom { palette, .. } => palette + Self::Custom { palette, .. } => *palette } } @@ -78,7 +78,7 @@ impl application::StyleSheet for Theme { background_color: palette.background.base.color, text_color: palette.background.base.text, }, - Application::Custom(f) => f(*self), + Application::Custom(f) => f(self.clone()), } } } -- cgit