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 {
|
||||
fd: File::open(cache)?,
|
||||
checker: IntegrityChecker::new(sri),
|
||||
|
|
|
|||
|
|
@ -50,10 +50,9 @@ impl PutOpts {
|
|||
written: 0,
|
||||
writer: write::Writer::new(
|
||||
cache.as_ref(),
|
||||
self.algorithm
|
||||
*self.algorithm
|
||||
.as_ref()
|
||||
.unwrap_or(&Algorithm::Sha256)
|
||||
.clone(),
|
||||
.unwrap_or(&Algorithm::Sha256),
|
||||
)?,
|
||||
opts: self,
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue