diff --git a/src/style/attributes.rs b/src/style/attributes.rs index aa481c3a..83dea3ed 100644 --- a/src/style/attributes.rs +++ b/src/style/attributes.rs @@ -140,8 +140,11 @@ mod tests { #[test] fn test_attributes_const() { - const ATTRIBUTES: Attributes = Attributes::none().with(Attribute::Bold).with(Attribute::Italic).without(Attribute::Bold); - assert!(!ATTRIBUTES.has(Attribute::Bold)); - assert!(ATTRIBUTES.has(Attribute::Italic)); + const ATTRIBUTES: Attributes = Attributes::none() + .with(Attribute::Bold) + .with(Attribute::Italic) + .without(Attribute::Bold); + assert!(!ATTRIBUTES.has(Attribute::Bold)); + assert!(ATTRIBUTES.has(Attribute::Italic)); } } diff --git a/src/style/types/color.rs b/src/style/types/color.rs index 026dc7ef..d4d52844 100644 --- a/src/style/types/color.rs +++ b/src/style/types/color.rs @@ -246,15 +246,11 @@ impl serde::ser::Serialize for Color { if str.is_empty() { match *self { - Color::AnsiValue(value) => { - serializer.serialize_str(&format!("ansi_({})", value)) - } + Color::AnsiValue(value) => serializer.serialize_str(&format!("ansi_({})", value)), Color::Rgb { r, g, b } => { serializer.serialize_str(&format!("rgb_({},{},{})", r, g, b)) } - _ => { - Err(serde::ser::Error::custom("Could not serialize enum type")) - } + _ => Err(serde::ser::Error::custom("Could not serialize enum type")), } } else { serializer.serialize_str(str)