Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
SajjadPourali committed Sep 6, 2024
1 parent 7bf894e commit 553f5d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
5 changes: 1 addition & 4 deletions client/src/tunnel/tun.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,7 @@ impl TunListener {

let route = route
.await
.map_err(|e| {
warn!("Unable to manage routes");
e
})
.inspect_err(|_e| warn!("Unable to manage routes"))
.ok();

let mut ipstack_config = ipstack::IpStackConfig::default();
Expand Down
9 changes: 4 additions & 5 deletions types/src/policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,10 @@ impl PolicyItem {
protocol,
),
Self::Ip(_, ip, port, protocol) => (
if let Ok(state) = con.host.parse::<IpAddr>().map(|addr| ip.contains(&addr)) {
state
} else {
false
},
con.host
.parse::<IpAddr>()
.map(|addr| ip.contains(&addr))
.unwrap_or(false),
port,
protocol,
),
Expand Down

0 comments on commit 553f5d6

Please sign in to comment.