summaryrefslogtreecommitdiff
path: root/cli/args/flags_net.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-09-06 10:28:53 +0100
committerGitHub <noreply@github.com>2024-09-06 11:28:53 +0200
commit5dedb49ac4e18874ce2973ac7c0e491d5ec68155 (patch)
treed98987ab561f67f01157457178b974610c966c60 /cli/args/flags_net.rs
parent73ab32c55124124467ce66eca2220bc4a5dfad0f (diff)
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`.
Diffstat (limited to 'cli/args/flags_net.rs')
-rw-r--r--cli/args/flags_net.rs2
1 files changed, 1 insertions, 1 deletions
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<String>) -> clap::error::Result<Vec<String>> {
out.push(format!("{}:{}", host, port.0));
}
} else {
- host_and_port.parse::<NetDescriptor>().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)