From 98224cf91337aa312b72de87ea4c1b22794619b2 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 15 Oct 2022 16:53:34 -0500 Subject: fix clippy warnings --- azalea-chat/src/style.rs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'azalea-chat/src') diff --git a/azalea-chat/src/style.rs b/azalea-chat/src/style.rs index 6edcdc2d..6422d5e4 100755 --- a/azalea-chat/src/style.rs +++ b/azalea-chat/src/style.rs @@ -274,7 +274,7 @@ impl TryFrom for TextColor { } } -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct Style { // these are options instead of just bools because None is different than false in this case pub color: Option, @@ -288,20 +288,8 @@ pub struct Style { } impl Style { - pub fn default() -> Self { - Self::empty() - } - pub fn empty() -> Self { - Self { - color: None, - bold: None, - italic: None, - underlined: None, - strikethrough: None, - obfuscated: None, - reset: false, - } + Self::default() } pub fn deserialize(json: &Value) -> Style { -- cgit v1.2.3