Skip to content

Commit

Permalink
fix: alls -> allocs
Browse files Browse the repository at this point in the history
causes shadowing, but the shawoing makes perfect sense
  • Loading branch information
LeoDog896 committed Sep 2, 2023
1 parent f5a26dd commit d68881b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ additionals = "additionals"
stap = "stap"
# MIS value
mis = "mis"
# alls is short for allocs. TODO: maybe just make it allocs?
alls = "alls"
# datas is used a lot for plural.
datas = "datas"
# 2nd for second
Expand Down
8 changes: 4 additions & 4 deletions turn/src/allocation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ impl Allocation {
tokio::select! {
_ = &mut timer => {
if let Some(allocs) = &allocations{
let mut alls = allocs.lock().await;
if let Some(a) = alls.remove(&five_tuple) {
let mut allocs = allocs.lock().await;
if let Some(a) = allocs.remove(&five_tuple) {
let _ = a.close().await;
}
}
Expand Down Expand Up @@ -355,8 +355,8 @@ impl Allocation {
Ok((n, src_addr)) => (n, src_addr),
Err(_) => {
if let Some(allocs) = &allocations {
let mut alls = allocs.lock().await;
alls.remove(&five_tuple);
let mut allocs = allocs.lock().await;
allocs.remove(&five_tuple);
}
break;
}
Expand Down

0 comments on commit d68881b

Please sign in to comment.