diff --git a/protocol/src/format.rs b/protocol/src/format.rs index 88dba9c..79248d4 100644 --- a/protocol/src/format.rs +++ b/protocol/src/format.rs @@ -41,7 +41,7 @@ impl Component { if let Some(val) = v.as_str() { Component::Text(TextComponent { text: val.to_owned(), - modifier: modifier, + modifier, }) } else if v.get("text").is_some() { Component::Text(TextComponent::from_value(v, modifier)) @@ -49,7 +49,7 @@ impl Component { modifier.color = Some(Color::RGB(255, 0, 0)); Component::Text(TextComponent { text: "UNHANDLED".to_owned(), - modifier: modifier, + modifier, }) } } @@ -136,7 +136,7 @@ impl TextComponent { pub fn from_value(v: &serde_json::Value, modifier: Modifier) -> Self { TextComponent { text: v.get("text").unwrap().as_str().unwrap_or("").to_owned(), - modifier: modifier, + modifier, } } diff --git a/protocol/src/types/bit/map.rs b/protocol/src/types/bit/map.rs index 11979fe..2f86979 100644 --- a/protocol/src/types/bit/map.rs +++ b/protocol/src/types/bit/map.rs @@ -63,7 +63,7 @@ impl Map { Map { length: (bits.len()*64 + (size-1)) / size, bit_size: size, - bits: bits, + bits, } } diff --git a/protocol/src/types/metadata.rs b/protocol/src/types/metadata.rs index 5af4fcc..228a034 100644 --- a/protocol/src/types/metadata.rs +++ b/protocol/src/types/metadata.rs @@ -31,7 +31,7 @@ impl MetadataKey { #[allow(dead_code)] fn new(index: i32) -> MetadataKey { MetadataKey { - index: index, + index, ty: PhantomData, } }