aboutsummaryrefslogtreecommitdiff
path: root/azalea-chat/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-chat/src')
-rwxr-xr-xazalea-chat/src/style.rs16
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 {