diff --git a/protocol/src/format.rs b/protocol/src/format.rs index 1b1bad9..e75f3ec 100644 --- a/protocol/src/format.rs +++ b/protocol/src/format.rs @@ -33,7 +33,7 @@ impl Component { convert_legacy(&mut component); }, } - return component; + component } pub fn from_value(v: &serde_json::Value) -> Self { diff --git a/protocol/src/nbt/mod.rs b/protocol/src/nbt/mod.rs index ecd9495..0ded16d 100644 --- a/protocol/src/nbt/mod.rs +++ b/protocol/src/nbt/mod.rs @@ -14,7 +14,7 @@ use std::collections::HashMap; use std::io; -use std::io::{Read, Write}; +use std::io::Read; use super::protocol::Serializable; use super::protocol; diff --git a/protocol/src/types/bit/set.rs b/protocol/src/types/bit/set.rs index 8c9c221..894d936 100644 --- a/protocol/src/types/bit/set.rs +++ b/protocol/src/types/bit/set.rs @@ -68,7 +68,7 @@ impl Set { pub fn or(&mut self, other: &Set) { for (a, b) in self.data.iter_mut().zip(&other.data) { - *a = (*a) | *b; + *a |= *b; } } } diff --git a/protocol/src/types/metadata.rs b/protocol/src/types/metadata.rs index e5c8040..0cf30be 100644 --- a/protocol/src/types/metadata.rs +++ b/protocol/src/types/metadata.rs @@ -15,7 +15,6 @@ use std::collections::HashMap; use std::marker::PhantomData; use std::io; -use std::io::Write; use std::fmt; use protocol; use protocol::Serializable;