Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Pr0methean committed Jul 2, 2023
1 parent 84baacf commit af4e4e4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/hash.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use alloc::vec::Vec;

use lockfree_object_pool::LinearObjectPool;
use once_cell::sync::Lazy;

Expand Down Expand Up @@ -160,5 +161,5 @@ impl ZopfliHash {
}
}

pub static HASH_POOL: Lazy<LinearObjectPool<ZopfliHash>> = Lazy::new(|| LinearObjectPool::new(
ZopfliHash::new, |hash| hash.reset()));
pub static HASH_POOL: Lazy<LinearObjectPool<ZopfliHash>> =
Lazy::new(|| LinearObjectPool::new(ZopfliHash::new, ZopfliHash::reset));
3 changes: 1 addition & 2 deletions src/lz77.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ use core::cmp;

use crate::{
cache::{Cache, NoCache, ZopfliLongestMatchCache},
hash::{Which, ZopfliHash},
hash::{Which, ZopfliHash, HASH_POOL},
symbols::{get_dist_symbol, get_length_symbol},
util::{
ZOPFLI_MAX_CHAIN_HITS, ZOPFLI_MAX_MATCH, ZOPFLI_MIN_MATCH, ZOPFLI_NUM_D, ZOPFLI_NUM_LL,
ZOPFLI_WINDOW_MASK, ZOPFLI_WINDOW_SIZE,
},
Options,
};
use crate::hash::HASH_POOL;

#[derive(Clone, Copy)]
pub enum LitLen {
Expand Down
3 changes: 1 addition & 2 deletions src/squeeze.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ use log::{debug, trace};
use crate::{
cache::Cache,
deflate::{calculate_block_size, BlockType},
hash::ZopfliHash,
hash::{ZopfliHash, HASH_POOL},
lz77::{find_longest_match, LitLen, Lz77Store, ZopfliBlockState},
symbols::{get_dist_extra_bits, get_dist_symbol, get_length_extra_bits, get_length_symbol},
util::{ZOPFLI_MAX_MATCH, ZOPFLI_NUM_D, ZOPFLI_NUM_LL, ZOPFLI_WINDOW_MASK, ZOPFLI_WINDOW_SIZE},
};
use crate::hash::HASH_POOL;

const K_INV_LOG2: f64 = core::f64::consts::LOG2_E; // 1.0 / log(2.0)

Expand Down

0 comments on commit af4e4e4

Please sign in to comment.