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; /// 直接读取长度和值 不带名称