From 8575df5587bc75cba201012dd0daf08f057c4bc6 Mon Sep 17 00:00:00 2001 From: trkelly23 Date: Sun, 12 Nov 2023 20:28:15 -0500 Subject: [PATCH] Files after runnng cargo fmt --- src/config.rs | 2 +- src/config/cmd.rs | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/config.rs b/src/config.rs index 679c27129..5227accbd 100644 --- a/src/config.rs +++ b/src/config.rs @@ -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)?; diff --git a/src/config/cmd.rs b/src/config/cmd.rs index b42a3e4c9..8a2f2b215 100644 --- a/src/config/cmd.rs +++ b/src/config/cmd.rs @@ -34,15 +34,30 @@ pub struct Args { pub protocol: Option, /// 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