fix(fmt): cargo fmt

This commit is contained in:
Kat Marchán 2019-06-26 21:41:44 -07:00
parent 15f017fe21
commit bc56a1b3fe
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
6 changed files with 13 additions and 12 deletions

View File

@ -1,10 +1,5 @@
use criterion::{
black_box,
Criterion,
criterion_group,
criterion_main
};
use cacache; use cacache;
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use tempfile; use tempfile;
fn get(c: &mut Criterion) { fn get(c: &mut Criterion) {

View File

@ -1,4 +1,4 @@
pub mod path; pub mod path;
pub mod read; pub mod read;
pub mod write;
pub mod rm; pub mod rm;
pub mod write;

View File

@ -1,5 +1,5 @@
use std::path::{PathBuf, Path};
use ssri::Integrity; use ssri::Integrity;
use std::path::{Path, PathBuf};
const CONTENT_VERSION: &str = "2"; const CONTENT_VERSION: &str = "2";

View File

@ -92,7 +92,10 @@ pub fn find(cache: &Path, key: &str) -> Result<Option<Entry>, Error> {
} }
pub fn delete(cache: &Path, key: &str) -> Result<(), Error> { pub fn delete(cache: &Path, key: &str) -> Result<(), Error> {
insert(cache, key, PutOpts { insert(
cache,
key,
PutOpts {
algorithm: None, algorithm: None,
size: None, size: None,
sri: None, sri: None,
@ -100,7 +103,7 @@ pub fn delete(cache: &Path, key: &str) -> Result<(), Error> {
metadata: None, metadata: None,
uid: None, uid: None,
gid: None, gid: None,
} },
)?; )?;
Ok(()) Ok(())
} }

View File

@ -7,9 +7,9 @@ mod errors;
mod index; mod index;
pub mod get; pub mod get;
pub mod ls;
pub mod put; pub mod put;
pub mod rm; pub mod rm;
pub mod ls;
pub use errors::Error; pub use errors::Error;
pub use index::Entry; pub use index::Entry;

View File

@ -50,7 +50,10 @@ impl PutOpts {
written: 0, written: 0,
writer: write::Writer::new( writer: write::Writer::new(
cache.as_ref(), cache.as_ref(),
self.algorithm.as_ref().unwrap_or(&Algorithm::Sha256).clone() self.algorithm
.as_ref()
.unwrap_or(&Algorithm::Sha256)
.clone(),
)?, )?,
opts: self, opts: self,
}) })