mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-02 18:13:39 +00:00
fix(clippy): use is_multiple_of in JXL bit writer
This commit is contained in:
@@ -50,7 +50,7 @@ fn correct_16_bit_alpha_header(bytes: &[u8], width: u32, height: u32) -> Result<
|
||||
|
||||
fn write_bits(out: &mut Vec<u8>, pos: &mut usize, count: usize, value: u32) {
|
||||
for bit in 0..count {
|
||||
if *pos % 8 == 0 {
|
||||
if (*pos).is_multiple_of(8) {
|
||||
out.push(0);
|
||||
}
|
||||
out[*pos / 8] |= (((value >> bit) & 1) as u8) << (*pos % 8);
|
||||
|
||||
Reference in New Issue
Block a user