aboutsummaryrefslogtreecommitdiffstats
path: root/src/cache.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cache.rs')
-rw-r--r--src/cache.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cache.rs b/src/cache.rs
index 9089ff1..482a9b8 100644
--- a/src/cache.rs
+++ b/src/cache.rs
@@ -1,5 +1,5 @@
use std::{future::Future, time::*, collections::HashMap, hash::Hash};
-
+#[derive(Debug)]
pub struct AsyncCache<K, V, F> {
func: F,
cache: HashMap<K, (Instant, V)>,
@@ -12,7 +12,7 @@ where
K: Hash + PartialEq + Eq + Clone,
Fut: Future<Output = Result<V, &'static str>>
{
- pub fn new(interval: Duration, mut func: F) -> Self {
+ pub fn new(interval: Duration, func: F) -> Self {
Self{
cache: HashMap::new(),
interval, func