mirror of https://github.com/zkat/cacache-rs.git
fix(put): fix warnings
This commit is contained in:
parent
a5e9966624
commit
4a6950ff5d
|
|
@ -25,7 +25,7 @@ impl Reader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn open<'a>(cache: &Path, sri: Integrity) -> Result<Reader, Error> {
|
pub fn open(cache: &Path, sri: Integrity) -> Result<Reader, Error> {
|
||||||
Ok(Reader {
|
Ok(Reader {
|
||||||
fd: File::open(cache)?,
|
fd: File::open(cache)?,
|
||||||
checker: IntegrityChecker::new(sri),
|
checker: IntegrityChecker::new(sri),
|
||||||
|
|
|
||||||
|
|
@ -50,10 +50,9 @@ impl PutOpts {
|
||||||
written: 0,
|
written: 0,
|
||||||
writer: write::Writer::new(
|
writer: write::Writer::new(
|
||||||
cache.as_ref(),
|
cache.as_ref(),
|
||||||
self.algorithm
|
*self.algorithm
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.unwrap_or(&Algorithm::Sha256)
|
.unwrap_or(&Algorithm::Sha256),
|
||||||
.clone(),
|
|
||||||
)?,
|
)?,
|
||||||
opts: self,
|
opts: self,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue