Change BitSet

This commit is contained in:
Snowiiii 2024-08-03 14:21:08 +02:00
parent f779d31880
commit 1ad4074eba
2 changed files with 3 additions and 6 deletions

View File

@ -142,8 +142,8 @@ impl ByteBuffer {
} }
pub fn put_bit_set(&mut self, set: &BitSet) { pub fn put_bit_set(&mut self, set: &BitSet) {
self.put_var_int(set.length); self.put_var_int(set.0);
for b in &set.data { for b in &set.1 {
self.put_i64(*b); self.put_i64(*b);
} }
} }

View File

@ -19,10 +19,7 @@ pub type Identifier = String;
pub type VarInt = i32; pub type VarInt = i32;
pub type VarLong = i64; pub type VarLong = i64;
pub struct BitSet { pub struct BitSet(pub VarInt, pub Vec<i64>);
length: VarInt,
data: Vec<i64>,
}
pub struct VarInt32(pub i32); pub struct VarInt32(pub i32);