Skip to content

Commit eb8d37a

Browse files
committed
Update deps
1 parent e6b5b83 commit eb8d37a

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/allow_lists.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,10 @@ impl AllowLists {
6464
/// Returns `true` if the request should be denied.
6565
/// An empty list means no restriction (all allowed).
6666
pub fn is_denied(&self, req: &MultiBuyIncReqV1) -> bool {
67-
if !self.hotspots.is_empty()
68-
&& !req.hotspot_key.is_empty()
69-
&& !self.hotspots.contains(&req.hotspot_key[..])
70-
{
71-
return true;
72-
}
73-
if !self.regions.is_empty() && req.region != 0 && !self.regions.contains(&req.region) {
74-
return true;
75-
}
76-
false
67+
let hotspot_allowed = self.hotspots.contains(&req.hotspot_key);
68+
let region_allowed = self.regions.contains(&req.region);
69+
70+
!hotspot_allowed || !region_allowed
7771
}
7872
}
7973

0 commit comments

Comments
 (0)