Remove unecessary res variable

This commit is contained in:
Cecylia Bocovich 2024-03-09 19:23:40 -05:00
parent a6c98b8f43
commit 762fef432f
No known key found for this signature in database
GPG Key ID: 009DE379FD9B7B90
1 changed files with 2 additions and 4 deletions

View File

@ -542,10 +542,9 @@ impl BridgeAuth {
bridge: &BridgeLine,
available_bridge: Option<BridgeLine>,
) -> ReplaceSuccess {
let mut res = ReplaceSuccess::NotFound;
let reachable_bridges = &self.bridge_table.reachable.clone();
let Some(positions) = reachable_bridges.get(bridge) else {
return res;
return ReplaceSuccess::NotFound;
};
// select replacement:
// - first try the given bridge
@ -596,8 +595,7 @@ impl BridgeAuth {
// Remove the bridge from the bucket
self.bridge_table.reachable.remove(bridge);
}
res = ReplaceSuccess::Replaced;
res
ReplaceSuccess::Replaced
}
/// Mark a bridge as blocked