From 9c3cf994ec2a4016fdc5aca2a0f5d30b3cb3208d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Wed, 15 Sep 2021 20:32:18 -0700 Subject: [PATCH] misc: cargo fmt --- benches/benchmarks.rs | 2 -- src/get.rs | 16 +++++++--------- 2 files changed, 7 insertions(+), 11 deletions(-) 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(), - )) + )); } }