diff --git a/benches/benchmarks.rs b/benches/benchmarks.rs index 4567e77..5a8fb41 100644 --- a/benches/benchmarks.rs +++ b/benches/benchmarks.rs @@ -1,10 +1,5 @@ -use criterion::{ - black_box, - Criterion, - criterion_group, - criterion_main -}; use cacache; +use criterion::{black_box, criterion_group, criterion_main, Criterion}; use tempfile; fn get(c: &mut Criterion) { diff --git a/src/content/mod.rs b/src/content/mod.rs index 3ef7fa1..0b58856 100644 --- a/src/content/mod.rs +++ b/src/content/mod.rs @@ -1,4 +1,4 @@ pub mod path; pub mod read; -pub mod write; pub mod rm; +pub mod write; diff --git a/src/content/path.rs b/src/content/path.rs index 2be8cc9..dde6db9 100644 --- a/src/content/path.rs +++ b/src/content/path.rs @@ -1,5 +1,5 @@ -use std::path::{PathBuf, Path}; use ssri::Integrity; +use std::path::{Path, PathBuf}; const CONTENT_VERSION: &str = "2"; diff --git a/src/index.rs b/src/index.rs index b5ed3f2..2334851 100644 --- a/src/index.rs +++ b/src/index.rs @@ -92,7 +92,10 @@ pub fn find(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, size: None, sri: None, @@ -100,7 +103,7 @@ pub fn delete(cache: &Path, key: &str) -> Result<(), Error> { metadata: None, uid: None, gid: None, - } + }, )?; Ok(()) } diff --git a/src/lib.rs b/src/lib.rs index 05b0ec5..147816e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,9 +7,9 @@ mod errors; mod index; pub mod get; +pub mod ls; pub mod put; pub mod rm; -pub mod ls; pub use errors::Error; pub use index::Entry; diff --git a/src/put.rs b/src/put.rs index 80aef07..9bf659f 100644 --- a/src/put.rs +++ b/src/put.rs @@ -50,7 +50,10 @@ impl PutOpts { written: 0, writer: write::Writer::new( cache.as_ref(), - self.algorithm.as_ref().unwrap_or(&Algorithm::Sha256).clone() + self.algorithm + .as_ref() + .unwrap_or(&Algorithm::Sha256) + .clone(), )?, opts: self, })