aboutsummaryrefslogtreecommitdiff
path: root/src/modules/cache.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/cache.rs')
-rw-r--r--src/modules/cache.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/cache.rs b/src/modules/cache.rs
index 68f011f..8d77086 100644
--- a/src/modules/cache.rs
+++ b/src/modules/cache.rs
@@ -74,7 +74,7 @@ impl Node for Cache {
hasher.update(k);
hasher.update(v);
}
- let key: [u8; 32] = hasher.finalize().try_into().unwrap();
+ let key: [u8; 32] = hasher.finalize().into();
if let Some(resp) = self.entries.read().await.get(&key) {
return Ok(resp
@@ -90,7 +90,7 @@ impl Node for Cache {
let mut r1 = Response::new(Full::new(body.clone()).map_err(|e| match e {}).boxed());
*r1.headers_mut() = h.clone();
- *r1.status_mut() = s.clone();
+ *r1.status_mut() = s;
let mut r2 = Response::new(body);
*r2.headers_mut() = h;