add more From
This commit is contained in:
parent
18d1f3f566
commit
8e05b2cd69
10
src/data.rs
10
src/data.rs
@ -71,6 +71,16 @@ impl NbtItem {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<NbtValue> for NbtItem {
|
||||
#[inline]
|
||||
fn from(value: NbtValue) -> Self { Self::Value(value) }
|
||||
}
|
||||
|
||||
impl From<NbtList> for NbtItem {
|
||||
#[inline]
|
||||
fn from(value: NbtList) -> Self { Self::Array(value) }
|
||||
}
|
||||
|
||||
impl From<Vec<NbtItem>> for NbtList {
|
||||
#[inline]
|
||||
fn from(value: Vec<NbtItem>) -> Self { Self::List(Rc::new(RefCell::new(value))) }
|
||||
|
Loading…
Reference in New Issue
Block a user