eagerly derive all possible derives, more docs, new version

This commit is contained in:
Edgar 2022-10-26 11:31:26 +02:00
parent 9ec8459253
commit f8e093a19b
No known key found for this signature in database
2 changed files with 10 additions and 2 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "rustyman"
version = "0.2.2"
version = "0.2.3"
edition = "2021"
authors = ["Edgar <git@edgarluque.com>"]
description = "Huffman compression and decompression"

View file

@ -22,6 +22,10 @@
//! assert_eq!(&payload[..], decompressed);
//! ```
#![forbid(unsafe_code)]
#![deny(missing_docs)]
#![deny(rustdoc::missing_doc_code_examples)]
use std::{
cell::RefCell,
collections::{BinaryHeap, HashMap},
@ -77,7 +81,11 @@ impl Ord for Node {
}
}
#[derive(Debug, Clone)]
/// Holds the data needed to (de)compress.
///
/// - Compress with [Self::compress]
/// - Decompress with [Self::decompress]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Huffman {
tree: Vec<Node>,
// index lookup table for the leaf nodes.