diff options
author | Genny <gen@nyble.dev> | 2021-10-11 03:36:38 -0500 |
---|---|---|
committer | Genny <gen@nyble.dev> | 2021-10-11 03:36:38 -0500 |
commit | 757eab88d67a425728b87286c763387f52367196 (patch) | |
tree | f1d61edb0a838787f6984accdd92df68a69d567a /benches/lzw_encode.rs | |
parent | 9b7bd5696a21496fa0c38a17e69c5c0658acfe73 (diff) | |
download | gifed-757eab88d67a425728b87286c763387f52367196.tar.gz gifed-757eab88d67a425728b87286c763387f52367196.zip |
Run rustfmt
Diffstat (limited to 'benches/lzw_encode.rs')
-rw-r--r-- | benches/lzw_encode.rs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/benches/lzw_encode.rs b/benches/lzw_encode.rs index aacf4a3..69ed275 100644 --- a/benches/lzw_encode.rs +++ b/benches/lzw_encode.rs @@ -4,19 +4,19 @@ use rand::{thread_rng, Rng}; use weezl::{encode::Encoder, BitOrder}; pub fn criterion_benchmark(c: &mut Criterion) { - let mut random = [0u8; 2048]; - thread_rng().fill(&mut random[..]); + let mut random = [0u8; 2048]; + thread_rng().fill(&mut random[..]); - c.bench_function("lzw encode 255bytes", |b| { - b.iter(|| LZW::encode(8, black_box(&random))) - }); - c.bench_function("weezl encode 255bytes", |b| { - b.iter(|| { - Encoder::new(BitOrder::Msb, 8) - .encode(black_box(&random)) - .unwrap() - }) - }); + c.bench_function("lzw encode 255bytes", |b| { + b.iter(|| LZW::encode(8, black_box(&random))) + }); + c.bench_function("weezl encode 255bytes", |b| { + b.iter(|| { + Encoder::new(BitOrder::Msb, 8) + .encode(black_box(&random)) + .unwrap() + }) + }); } criterion_group!(benches, criterion_benchmark); |