From 2fdd7744764ccd067034a4f3bad01699a3093648 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Wed, 3 Jul 2024 21:29:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=98=E8=AE=B0=E4=BB=96=E4=BF=A9=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shen-nbt5/Cargo.toml | 2 +- shen-nbt5/src/writer.rs | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/shen-nbt5/Cargo.toml b/shen-nbt5/Cargo.toml index 243a841..8c22c0b 100644 --- a/shen-nbt5/Cargo.toml +++ b/shen-nbt5/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "shen-nbt5" -version = "0.4.5" +version = "0.4.6" edition = "2021" description = "Just A FASSST NBT parser/writer" homepage = "https://github.com/shenjackyuanjie/nbt-rust" diff --git a/shen-nbt5/src/writer.rs b/shen-nbt5/src/writer.rs index 871729e..b533037 100644 --- a/shen-nbt5/src/writer.rs +++ b/shen-nbt5/src/writer.rs @@ -70,9 +70,7 @@ impl NbtWriteTrait for Java { NbtValue::LongArray(x) => Self::write_i64_array(writer, x), NbtValue::String(x) => Self::write_nbt_string(writer, x), NbtValue::List(x) => Self::write_list(writer, x)?, - NbtValue::Compound(name, data) => { - Self::write_compound(writer, name.as_ref(), data)? - } + NbtValue::Compound(_, data) => Self::write_compound(writer, None, data)?, } } Ok(()) @@ -474,9 +472,7 @@ impl NbtWriteTrait for BedrockNetVarInt { NbtValue::LongArray(x) => Self::write_i64_array(writer, x), NbtValue::String(x) => Self::write_nbt_string(writer, x), NbtValue::List(x) => Self::write_list(writer, x)?, - NbtValue::Compound(name, data) => { - Self::write_compound(writer, name.as_ref(), data)? - } + NbtValue::Compound(_, data) => Self::write_compound(writer, None, data)?, } } Ok(())