misc: cargo fmt

This commit is contained in:
Kat Marchán 2021-09-15 20:32:18 -07:00
parent 323ecacc3b
commit 9c3cf994ec
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
2 changed files with 7 additions and 11 deletions

View File

@ -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) {

View File

@ -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<P: AsRef<Path>>(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(),
))
));
}
}