Skip to content

Commit

Permalink
Files after runnng cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
trkelly23 committed Nov 13, 2023
1 parent 60c1394 commit 8575df5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ impl TryFrom<(Args, &Platform)> for TrippyConfig {
let protocol = match (args.udp, args.tcp, args.icmp, protocol) {
(false, false, false, Protocol::Udp) | (true, _, _, _) => TracerProtocol::Udp,
(false, false, false, Protocol::Tcp) | (_, true, _, _) => TracerProtocol::Tcp,
(false, false, false, Protocol::Icmp) | (_, _, true, _) => TracerProtocol::Icmp,
(false, false, false, Protocol::Icmp) | (_, _, true, _) => TracerProtocol::Icmp,
};
let read_timeout = humantime::parse_duration(&read_timeout)?;
let min_round_duration = humantime::parse_duration(&min_round_duration)?;
Expand Down
21 changes: 18 additions & 3 deletions src/config/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,30 @@ pub struct Args {
pub protocol: Option<Protocol>,

/// Trace using the UDP protocol
#[arg(long, conflicts_with = "protocol", conflicts_with = "tcp", conflicts_with = "icmp")]
#[arg(
long,
conflicts_with = "protocol",
conflicts_with = "tcp",
conflicts_with = "icmp"
)]
pub udp: bool,

/// Trace using the TCP protocol
#[arg(long, conflicts_with = "protocol", conflicts_with = "udp", conflicts_with = "icmp")]
#[arg(
long,
conflicts_with = "protocol",
conflicts_with = "udp",
conflicts_with = "icmp"
)]
pub tcp: bool,

/// Trace using the ICMP protocol
#[arg(long, conflicts_with = "protocol", conflicts_with = "udp", conflicts_with = "tcp")]
#[arg(
long,
conflicts_with = "protocol",
conflicts_with = "udp",
conflicts_with = "tcp"
)]
pub icmp: bool,

/// Use IPv4 only
Expand Down

0 comments on commit 8575df5

Please sign in to comment.