From 28d674d4f593bfc31e4b090e6af765f80f000149 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Sat, 5 Aug 2023 11:36:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=99=BD=E7=84=B6=E4=BD=86=E6=98=AF=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E5=BA=94=E8=AF=A5=E5=A5=97=E5=A8=83=E7=9A=84=EF=BC=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/data.rs | 10 +++++----- src/read.rs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/data.rs b/src/data.rs index 3c1d1ec..e775705 100644 --- a/src/data.rs +++ b/src/data.rs @@ -83,27 +83,27 @@ impl From for NbtItem { impl From> for NbtItem { #[inline] - fn from(value: Vec) -> Self { Self::Array(NbtList::from(Rc::new(RefCell::new(value)))) } + fn from(value: Vec) -> Self { Self::Array(NbtList::from(value)) } } impl From, NbtItem>> for NbtItem { #[inline] - fn from(value: HashMap, NbtItem>) -> Self { Self::Array(NbtList::from(Rc::new(RefCell::new(value)))) } + fn from(value: HashMap, NbtItem>) -> Self { Self::Array(NbtList::from(value)) } } impl From> for NbtItem { #[inline] - fn from(value: Vec) -> Self { Self::Array(NbtList::from(Rc::new(RefCell::new(value)))) } + fn from(value: Vec) -> Self { Self::Array(NbtList::from(value)) } } impl From> for NbtItem { #[inline] - fn from(value: Vec) -> Self { Self::Array(NbtList::from(Rc::new(RefCell::new(value)))) } + fn from(value: Vec) -> Self { Self::Array(NbtList::from(value)) } } impl From> for NbtItem { #[inline] - fn from(value: Vec) -> Self { Self::Array(NbtList::from(Rc::new(RefCell::new(value)))) } + fn from(value: Vec) -> Self { Self::Array(NbtList::from(value)) } } impl From> for NbtList { diff --git a/src/read.rs b/src/read.rs index c59a1b7..4115def 100644 --- a/src/read.rs +++ b/src/read.rs @@ -12,8 +12,8 @@ use std::io::{Cursor, Read}; /// (0x0C) Vec pub mod read { use crate::data::{NbtItem, NbtLength, NbtList, NbtValue, Reader}; - use std::io::Read; use std::collections::HashMap; + use std::io::Read; use std::sync::Arc; /// 直接读取长度和值 不带名称