diff options
Diffstat (limited to 'azalea-core/src')
| -rwxr-xr-x | azalea-core/src/lib.rs | 1 | ||||
| -rw-r--r-- | azalea-core/src/registry_holder.rs | 6 | ||||
| -rwxr-xr-x | azalea-core/src/resource_location.rs | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/azalea-core/src/lib.rs b/azalea-core/src/lib.rs index 83dd6245..1596a673 100755 --- a/azalea-core/src/lib.rs +++ b/azalea-core/src/lib.rs @@ -1,5 +1,4 @@ #![doc = include_str!("../README.md")] -#![feature(lazy_cell)] #![feature(trait_upcasting)] #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/azalea-core/src/registry_holder.rs b/azalea-core/src/registry_holder.rs index 68dfcf29..119a1317 100644 --- a/azalea-core/src/registry_holder.rs +++ b/azalea-core/src/registry_holder.rs @@ -53,7 +53,7 @@ impl RegistryHolder { value.write(&mut nbt_bytes); let nbt_borrow_compound = simdnbt::borrow::read_compound(&mut Cursor::new(&nbt_bytes)).ok()?; - let value = match T::from_compound(&nbt_borrow_compound) { + let value = match T::from_compound((&nbt_borrow_compound).into()) { Ok(value) => value, Err(err) => { return Some(Err(err)); @@ -182,7 +182,7 @@ pub enum MonsterSpawnLightLevel { } impl FromNbtTag for MonsterSpawnLightLevel { - fn from_nbt_tag(tag: &simdnbt::borrow::NbtTag) -> Option<Self> { + fn from_nbt_tag(tag: simdnbt::borrow::NbtTag) -> Option<Self> { if let Some(value) = tag.int() { Some(Self::Simple(value as u32)) } else if let Some(value) = tag.compound() { @@ -240,7 +240,7 @@ pub enum BiomePrecipitation { Snow, } impl FromNbtTag for BiomePrecipitation { - fn from_nbt_tag(tag: &simdnbt::borrow::NbtTag) -> Option<Self> { + fn from_nbt_tag(tag: simdnbt::borrow::NbtTag) -> Option<Self> { match tag.string()?.to_str().as_ref() { "none" => Some(Self::None), "rain" => Some(Self::Rain), diff --git a/azalea-core/src/resource_location.rs b/azalea-core/src/resource_location.rs index a6dcc0be..2b0feb71 100755 --- a/azalea-core/src/resource_location.rs +++ b/azalea-core/src/resource_location.rs @@ -101,7 +101,7 @@ impl<'de> Deserialize<'de> for ResourceLocation { } impl FromNbtTag for ResourceLocation { - fn from_nbt_tag(tag: &simdnbt::borrow::NbtTag) -> Option<Self> { + fn from_nbt_tag(tag: simdnbt::borrow::NbtTag) -> Option<Self> { tag.string().and_then(|s| s.to_str().parse().ok()) } } |
