Skip to content

Commit

Permalink
Clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fintelia committed Aug 3, 2024
1 parent caccd02 commit 22f1a9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/huffman.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl HuffmanTree {
let mut table = vec![0; table_size];
for (symbol, (&code, &length)) in huff_codes.iter().zip(code_lengths.iter()).enumerate() {
if length != 0 && length <= table_bits {
let mut j = ((code as u16).reverse_bits() >> (16 - length)) as usize;
let mut j = (u16::reverse_bits(code) >> (16 - length)) as usize;
let entry = ((length as u32) << 16) | symbol as u32;
while j < table_size {
table[j] = entry;
Expand Down

0 comments on commit 22f1a9c

Please sign in to comment.