Fix another clippy warning

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/9/head
trivernis 2 years ago
parent 85213d09a3
commit afa1432b0e
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -1,6 +1,6 @@
[package]
name = "minecraft-data-rs"
version = "0.4.7"
version = "0.5.0"
authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018"
readme = "README.md"

@ -32,9 +32,9 @@ pub enum DataTypeReference {
Complex { name: String, properties: Value },
}
impl Into<PacketDataType> for DataTypeReference {
fn into(self) -> PacketDataType {
let (name, properties) = match self {
impl From<DataTypeReference> for PacketDataType {
fn from(val: DataTypeReference) -> Self {
let (name, properties) = match val {
DataTypeReference::Simple(simple) => (simple, Value::Null),
DataTypeReference::Complex { name, properties } => (name, properties),
};

Loading…
Cancel
Save