Skip to content

Commit

Permalink
fix: typo (#269)
Browse files Browse the repository at this point in the history
* fix: typo

* remove test
  • Loading branch information
guibescos authored Dec 2, 2024
1 parent 041fff2 commit 3f95b14
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ use {

impl<T: ChainTrait> Repository<T> {
pub async fn remove_in_memory_auction_lock(&self, key: &entities::PermissionKey<T>) {
let mut mutex_gaurd = self.in_memory_store.auction_lock.lock().await;
let auction_lock = mutex_gaurd.get(key);
let mut mutex_guard = self.in_memory_store.auction_lock.lock().await;
let auction_lock = mutex_guard.get(key);
if let Some(auction_lock) = auction_lock {
// Whenever there is no thread borrowing a lock for this key, we can remove it from the locks HashMap.
if Arc::strong_count(auction_lock) == 1 {
mutex_gaurd.remove(key);
mutex_guard.remove(key);
}
}
}
Expand Down

0 comments on commit 3f95b14

Please sign in to comment.