Skip to content

Commit d68881b

Browse files
committed
fix: alls -> allocs
causes shadowing, but the shawoing makes perfect sense
1 parent f5a26dd commit d68881b

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

_typos.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ additionals = "additionals"
99
stap = "stap"
1010
# MIS value
1111
mis = "mis"
12-
# alls is short for allocs. TODO: maybe just make it allocs?
13-
alls = "alls"
1412
# datas is used a lot for plural.
1513
datas = "datas"
1614
# 2nd for second

turn/src/allocation/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ impl Allocation {
279279
tokio::select! {
280280
_ = &mut timer => {
281281
if let Some(allocs) = &allocations{
282-
let mut alls = allocs.lock().await;
283-
if let Some(a) = alls.remove(&five_tuple) {
282+
let mut allocs = allocs.lock().await;
283+
if let Some(a) = allocs.remove(&five_tuple) {
284284
let _ = a.close().await;
285285
}
286286
}
@@ -355,8 +355,8 @@ impl Allocation {
355355
Ok((n, src_addr)) => (n, src_addr),
356356
Err(_) => {
357357
if let Some(allocs) = &allocations {
358-
let mut alls = allocs.lock().await;
359-
alls.remove(&five_tuple);
358+
let mut allocs = allocs.lock().await;
359+
allocs.remove(&five_tuple);
360360
}
361361
break;
362362
}

0 commit comments

Comments
 (0)