aboutsummaryrefslogtreecommitdiffstats
path: root/src/cache.rs
diff options
context:
space:
mode:
authoralyx <alyx@aleteoryx.me>2023-08-09 15:04:41 -0400
committeralyx <alyx@aleteoryx.me>2023-08-09 15:04:41 -0400
commitd0fc16dde4cf1c58769dfff058509677f601eb8e (patch)
treee9721c547732a6082eac922cc661ea8e1aaadbff /src/cache.rs
parent40372f0cf8a95f4d5bdf78fc522328b776482dbf (diff)
downloadlfm_embed-d0fc16dde4cf1c58769dfff058509677f601eb8e.tar.gz
lfm_embed-d0fc16dde4cf1c58769dfff058509677f601eb8e.tar.bz2
lfm_embed-d0fc16dde4cf1c58769dfff058509677f601eb8e.zip
config done
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