mirror of
https://github.com/edg-l/rustyman.git
synced 2024-11-09 17:48:20 +00:00
format
This commit is contained in:
parent
7bbc325eb7
commit
f05132f0ee
10
src/lib.rs
10
src/lib.rs
|
@ -26,9 +26,7 @@
|
||||||
#![deny(missing_docs)]
|
#![deny(missing_docs)]
|
||||||
#![deny(rustdoc::missing_doc_code_examples)]
|
#![deny(rustdoc::missing_doc_code_examples)]
|
||||||
|
|
||||||
use std::{
|
use std::collections::BinaryHeap;
|
||||||
collections::{BinaryHeap},
|
|
||||||
};
|
|
||||||
|
|
||||||
use bit_vec::BitVec;
|
use bit_vec::BitVec;
|
||||||
|
|
||||||
|
@ -179,11 +177,7 @@ impl Huffman {
|
||||||
let mut bits = BitVec::new();
|
let mut bits = BitVec::new();
|
||||||
|
|
||||||
for b in data.iter() {
|
for b in data.iter() {
|
||||||
self.traverse(
|
self.traverse(&mut bits, *b as usize, None)
|
||||||
&mut bits,
|
|
||||||
*b as usize,
|
|
||||||
None,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bits.to_bytes()
|
bits.to_bytes()
|
||||||
|
|
Loading…
Reference in a new issue