fix(put): fix warnings

This commit is contained in:
Kat Marchán 2019-06-27 22:45:11 -07:00
parent a5e9966624
commit 4a6950ff5d
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
2 changed files with 3 additions and 4 deletions

View File

@ -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),

View File

@ -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,
})