mirror of https://github.com/zkat/cacache-rs.git
fix(fmt): cargo fmt
This commit is contained in:
parent
15f017fe21
commit
bc56a1b3fe
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
pub mod path;
|
||||
pub mod read;
|
||||
pub mod write;
|
||||
pub mod rm;
|
||||
pub mod write;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use std::path::{PathBuf, Path};
|
||||
use ssri::Integrity;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
const CONTENT_VERSION: &str = "2";
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,10 @@ pub fn find(cache: &Path, key: &str) -> Result<Option<Entry>, 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(())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue