From afa1432b0e92e7c7f09a3e2cdd8b23c5b0abfbf6 Mon Sep 17 00:00:00 2001 From: trivernis Date: Thu, 23 Jun 2022 19:43:19 +0200 Subject: [PATCH] Fix another clippy warning Signed-off-by: trivernis --- Cargo.toml | 2 +- src/models/protocol/mod.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 562a826..f68edc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "minecraft-data-rs" -version = "0.4.7" +version = "0.5.0" authors = ["trivernis "] edition = "2018" readme = "README.md" diff --git a/src/models/protocol/mod.rs b/src/models/protocol/mod.rs index c8b95ef..fd022f4 100644 --- a/src/models/protocol/mod.rs +++ b/src/models/protocol/mod.rs @@ -32,9 +32,9 @@ pub enum DataTypeReference { Complex { name: String, properties: Value }, } -impl Into for DataTypeReference { - fn into(self) -> PacketDataType { - let (name, properties) = match self { +impl From for PacketDataType { + fn from(val: DataTypeReference) -> Self { + let (name, properties) = match val { DataTypeReference::Simple(simple) => (simple, Value::Null), DataTypeReference::Complex { name, properties } => (name, properties), };