diff options
| author | mat <git@matdoes.dev> | 2025-05-30 12:59:08 -1345 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-05-30 12:59:08 -1345 |
| commit | a64c6505049082175224802c5be51ac8f0cf4677 (patch) | |
| tree | 443877d470fed94810b4b7180b2584dd5ae3fc9d /azalea-protocol/src/common | |
| parent | cfdd8e690f230bc84fc126d5a8bfa13df0f6d781 (diff) | |
| download | azalea-drasl-a64c6505049082175224802c5be51ac8f0cf4677.tar.xz | |
make fixedbitset require generic const exprs again :3
Diffstat (limited to 'azalea-protocol/src/common')
| -rw-r--r-- | azalea-protocol/src/common/client_information.rs | 4 | ||||
| -rw-r--r-- | azalea-protocol/src/common/movements.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/azalea-protocol/src/common/client_information.rs b/azalea-protocol/src/common/client_information.rs index f2290fe7..6f5e05e2 100644 --- a/azalea-protocol/src/common/client_information.rs +++ b/azalea-protocol/src/common/client_information.rs @@ -97,7 +97,7 @@ impl Default for ModelCustomization { impl AzaleaRead for ModelCustomization { fn azalea_read(buf: &mut std::io::Cursor<&[u8]>) -> Result<Self, azalea_buf::BufReadError> { - let set = FixedBitSet::<{ 7_usize.div_ceil(8) }>::azalea_read(buf)?; + let set = FixedBitSet::<7>::azalea_read(buf)?; Ok(Self { cape: set.index(0), jacket: set.index(1), @@ -112,7 +112,7 @@ impl AzaleaRead for ModelCustomization { impl AzaleaWrite for ModelCustomization { fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { - let mut set = FixedBitSet::<{ 7_usize.div_ceil(8) }>::new(); + let mut set = FixedBitSet::<7>::new(); if self.cape { set.set(0); } diff --git a/azalea-protocol/src/common/movements.rs b/azalea-protocol/src/common/movements.rs index a3898805..cf51a57c 100644 --- a/azalea-protocol/src/common/movements.rs +++ b/azalea-protocol/src/common/movements.rs @@ -32,7 +32,7 @@ pub struct RelativeMovements { impl AzaleaRead for RelativeMovements { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> { // yes minecraft seriously wastes that many bits, smh - let set = FixedBitSet::<{ 32_usize.div_ceil(8) }>::azalea_read(buf)?; + let set = FixedBitSet::<32>::azalea_read(buf)?; Ok(RelativeMovements { x: set.index(0), y: set.index(1), @@ -49,7 +49,7 @@ impl AzaleaRead for RelativeMovements { impl AzaleaWrite for RelativeMovements { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), io::Error> { - let mut set = FixedBitSet::<{ 32_usize.div_ceil(8) }>::new(); + let mut set = FixedBitSet::<32>::new(); let mut set_bit = |index: usize, value: bool| { if value { set.set(index); |
