From 5dedb49ac4e18874ce2973ac7c0e491d5ec68155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 6 Sep 2024 10:28:53 +0100 Subject: refactor(permissions): remove FromStr implementations, add ::parse methods (#25473) The `.parse()` calls in permission code are only making it more confusing, verbosity is encouraged and welcome in this code even at the cost of not being concise. Left a couple TODOs to not use `AnyError`. --- cli/args/flags_net.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli/args/flags_net.rs') diff --git a/cli/args/flags_net.rs b/cli/args/flags_net.rs index 57cf8d527..88ffcf0e4 100644 --- a/cli/args/flags_net.rs +++ b/cli/args/flags_net.rs @@ -50,7 +50,7 @@ pub fn parse(paths: Vec) -> clap::error::Result> { out.push(format!("{}:{}", host, port.0)); } } else { - host_and_port.parse::().map_err(|e| { + NetDescriptor::parse(&host_and_port).map_err(|e| { clap::Error::raw(clap::error::ErrorKind::InvalidValue, format!("{e:?}")) })?; out.push(host_and_port) -- cgit v1.2.3