aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/common/movements.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-05-30 12:59:08 -1345
committermat <git@matdoes.dev>2025-05-30 12:59:08 -1345
commita64c6505049082175224802c5be51ac8f0cf4677 (patch)
tree443877d470fed94810b4b7180b2584dd5ae3fc9d /azalea-protocol/src/common/movements.rs
parentcfdd8e690f230bc84fc126d5a8bfa13df0f6d781 (diff)
downloadazalea-drasl-a64c6505049082175224802c5be51ac8f0cf4677.tar.xz
make fixedbitset require generic const exprs again :3
Diffstat (limited to 'azalea-protocol/src/common/movements.rs')
-rw-r--r--azalea-protocol/src/common/movements.rs4
1 files changed, 2 insertions, 2 deletions
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);