From a1331664d5acf5a8a348dd2177d0d14735d82a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cramfox=E2=80=9D?= <“kasey@n0.computer”> Date: Mon, 16 Dec 2024 11:37:07 -0500 Subject: [PATCH] adjust enable probes API --- iroh-net-report/src/lib.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/iroh-net-report/src/lib.rs b/iroh-net-report/src/lib.rs index db3e86acca..49bace0e45 100644 --- a/iroh-net-report/src/lib.rs +++ b/iroh-net-report/src/lib.rs @@ -295,21 +295,21 @@ impl Options { self } - /// Enable icmp_v4 probe - pub fn enable_icmp_v4(mut self) -> Self { - self.icmp_v4 = true; + /// Enable or disable icmp_v4 probe + pub fn icmp_v4(mut self, enable: bool) -> Self { + self.icmp_v4 = enable; self } - /// Enable icmp_v6 probe - pub fn enable_icmp_v6(mut self) -> Self { - self.icmp_v6 = true; + /// Enable or disable icmp_v6 probe + pub fn icmp_v6(mut self, enable: bool) -> Self { + self.icmp_v6 = enable; self } - /// Enable https probe - pub fn enable_https(mut self) -> Self { - self.https = true; + /// Enable or disable https probe + pub fn https(mut self, enable: bool) -> Self { + self.https = enable; self }