Skip to content

Commit

Permalink
[refactor] Fixing storage type structure
Browse files Browse the repository at this point in the history
  • Loading branch information
didierofrivia committed Jul 10, 2023
1 parent 0355d4f commit 2fafbed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions limitador/src/storage/in_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ impl PartialEq for CounterKey {
}
}

type NamespacedLimitCounters<T> = HashMap<Namespace, HashMap<Limit, HashMap<CounterKey, T>>>;

pub struct InMemoryStorage {
//TODO: This is a bit ugly, to address in the future
#[allow(clippy::type_complexity)]
limits_for_namespace:
RwLock<HashMap<Namespace, HashMap<Limit, HashMap<CounterKey, ExpiringValue>>>>,
RwLock<NamespacedLimitCounters<ExpiringValue>>,
}

impl CounterStorage for InMemoryStorage {
Expand Down

0 comments on commit 2fafbed

Please sign in to comment.