diff options
| author | mat <github@matdoes.dev> | 2022-10-15 16:53:34 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-10-15 16:53:34 -0500 |
| commit | 98224cf91337aa312b72de87ea4c1b22794619b2 (patch) | |
| tree | a00f3468543d292c1b6f4eb212fcc3e3b3e13e2e /azalea-chat/src | |
| parent | a348f67b9646cf51bedf413bf79271391bdb23b2 (diff) | |
| download | azalea-drasl-98224cf91337aa312b72de87ea4c1b22794619b2.tar.xz | |
fix clippy warnings
Diffstat (limited to 'azalea-chat/src')
| -rwxr-xr-x | azalea-chat/src/style.rs | 16 |
1 files changed, 2 insertions, 14 deletions
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<ChatFormatting> 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<TextColor>, @@ -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 { |
