diff --git a/src/content/read.rs b/src/content/read.rs index 70fab12..a9216eb 100644 --- a/src/content/read.rs +++ b/src/content/read.rs @@ -25,7 +25,7 @@ impl Reader { } } -pub fn open<'a>(cache: &Path, sri: Integrity) -> Result { +pub fn open(cache: &Path, sri: Integrity) -> Result { Ok(Reader { fd: File::open(cache)?, checker: IntegrityChecker::new(sri), diff --git a/src/put.rs b/src/put.rs index 9bf659f..5d0f982 100644 --- a/src/put.rs +++ b/src/put.rs @@ -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, })