Skip to content

Commit

Permalink
Fix style.
Browse files Browse the repository at this point in the history
  • Loading branch information
BenLand100 committed Jan 13, 2024
1 parent 73cbfa0 commit 40c4594
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vopono_core/src/network/piapf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ impl Piapf {
}
let re = Regex::new(r" *1 *(?P<gateway>\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}).*").unwrap();
let result = String::from_utf8_lossy(&traceroute_response.stdout);
let second_line = result.lines().skip(1).next().unwrap();
let vpn_gateway = re.captures(&second_line).unwrap().get(1).unwrap().as_str().to_string();
let second_line = result.lines().nth(1).unwrap();
let vpn_gateway = re.captures(second_line).unwrap().get(1).unwrap().as_str().to_string();

log::info!("PIA gateway: {}", vpn_gateway);

Expand Down

0 comments on commit 40c4594

Please sign in to comment.