summaryrefslogtreecommitdiff
path: root/cli/args/flags_allow_net.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/args/flags_allow_net.rs')
-rw-r--r--cli/args/flags_allow_net.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/args/flags_allow_net.rs b/cli/args/flags_allow_net.rs
index bf189132a..88d9d3c02 100644
--- a/cli/args/flags_allow_net.rs
+++ b/cli/args/flags_allow_net.rs
@@ -27,13 +27,13 @@ impl FromStr for BarePort {
}
pub fn validator(host_and_port: &str) -> Result<(), String> {
- if Url::parse(&format!("deno://{}", host_and_port)).is_ok()
+ if Url::parse(&format!("deno://{host_and_port}")).is_ok()
|| host_and_port.parse::<IpAddr>().is_ok()
|| host_and_port.parse::<BarePort>().is_ok()
{
Ok(())
} else {
- Err(format!("Bad host:port pair: {}", host_and_port))
+ Err(format!("Bad host:port pair: {host_and_port}"))
}
}
@@ -43,7 +43,7 @@ pub fn validator(host_and_port: &str) -> Result<(), String> {
pub fn parse(paths: Vec<String>) -> clap::Result<Vec<String>> {
let mut out: Vec<String> = vec![];
for host_and_port in paths.iter() {
- if Url::parse(&format!("deno://{}", host_and_port)).is_ok()
+ if Url::parse(&format!("deno://{host_and_port}")).is_ok()
|| host_and_port.parse::<IpAddr>().is_ok()
{
out.push(host_and_port.to_owned())
@@ -55,7 +55,7 @@ pub fn parse(paths: Vec<String>) -> clap::Result<Vec<String>> {
} else {
return Err(clap::Error::raw(
clap::ErrorKind::InvalidValue,
- format!("Bad host:port pair: {}", host_and_port),
+ format!("Bad host:port pair: {host_and_port}"),
));
}
}