Skip to content

Commit

Permalink
Remove extraneous drop and Arc.
Browse files Browse the repository at this point in the history
  • Loading branch information
arik-so committed Mar 22, 2024
1 parent 9f56210 commit 414ec15
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/persistence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl<L: Deref> GossipPersister<L> where L::Target: Logger {

let limiter_ref = Arc::clone(&insert_limiter);
let client = {
let connections_cache_ref = Arc::clone(&connections_cache);
let connections_cache_ref = &connections_cache;

let mut connections_set = connections_cache_ref.lock().await;
let client = if connections_set.is_empty() {
Expand Down Expand Up @@ -167,7 +167,6 @@ impl<L: Deref> GossipPersister<L> where L::Target: Logger {
let mut connections_set = connections_cache_ref.lock().await;
connections_set.push(client);
limiter_ref.add_permits(1);
drop(connections_set);
});
#[cfg(test)]
tasks_spawned.push(_task);
Expand Down

0 comments on commit 414ec15

Please sign in to comment.