From 3c3952bb0b255a4e03537fbfe3b53634a64c6a7b Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 27 Dec 2024 05:43:35 +0000 Subject: resolve some todos in az-core --- azalea-block/src/range.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'azalea-block/src') diff --git a/azalea-block/src/range.rs b/azalea-block/src/range.rs index 779d805d..fb6552d5 100644 --- a/azalea-block/src/range.rs +++ b/azalea-block/src/range.rs @@ -44,3 +44,19 @@ impl Add for BlockStates { } } } + +impl From> for BlockStates { + fn from(set: HashSet) -> Self { + Self { + set: set.into_iter().map(|b| b.into()).collect(), + } + } +} + +impl From<&HashSet> for BlockStates { + fn from(set: &HashSet) -> Self { + Self { + set: set.iter().map(|&b| b.into()).collect(), + } + } +} -- cgit v1.2.3