mirror of
https://github.com/edg-l/rustyman.git
synced 2024-11-21 15:38:21 +00:00
eagerly derive all possible derives, more docs, new version
This commit is contained in:
parent
9ec8459253
commit
f8e093a19b
|
@ -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"
|
||||
|
|
10
src/lib.rs
10
src/lib.rs
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue