diff --git a/benches/benchmarks.rs b/benches/benchmarks.rs index 3c07903..6f79ed0 100644 --- a/benches/benchmarks.rs +++ b/benches/benchmarks.rs @@ -2,10 +2,8 @@ use async_std::{fs as afs, task}; use std::fs::{self, File}; use std::io::prelude::*; - use criterion::{black_box, criterion_group, criterion_main, Criterion}; - const NUM_REPEATS: usize = 10; fn baseline_read_sync(c: &mut Criterion) { diff --git a/src/get.rs b/src/get.rs index 178bc34..573c081 100644 --- a/src/get.rs +++ b/src/get.rs @@ -89,7 +89,7 @@ impl Reader { return Err(Error::EntryNotFound( cache.as_ref().to_path_buf(), key.as_ref().into(), - )) + )); } } @@ -146,7 +146,7 @@ where return Err(Error::EntryNotFound( cache.as_ref().to_path_buf(), key.as_ref().into(), - )) + )); } } @@ -198,7 +198,7 @@ where return Err(Error::EntryNotFound( cache.as_ref().to_path_buf(), key.as_ref().into(), - )) + )); } } @@ -240,9 +240,7 @@ where /// Returns true if the given hash exists in the cache. pub async fn exists>(cache: P, sri: &Integrity) -> bool { - read::has_content_async(cache.as_ref(), sri) - .await - .is_some() + read::has_content_async(cache.as_ref(), sri).await.is_some() } // --------------- @@ -313,7 +311,7 @@ impl SyncReader { return Err(Error::EntryNotFound( cache.as_ref().to_path_buf(), key.as_ref().into(), - )) + )); } } @@ -366,7 +364,7 @@ where return Err(Error::EntryNotFound( cache.as_ref().to_path_buf(), key.as_ref().into(), - )) + )); } } @@ -414,7 +412,7 @@ where return Err(Error::EntryNotFound( cache.as_ref().to_path_buf(), key.as_ref().into(), - )) + )); } }