From 4a6950ff5ddf6d3f110d2cf9bedeb1ef3134d1fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Thu, 27 Jun 2019 22:45:11 -0700 Subject: [PATCH] fix(put): fix warnings --- src/content/read.rs | 2 +- src/put.rs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) 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, })