diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2023-02-05 17:49:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-05 17:49:20 +0100 |
commit | 84a96110cd8e74228fbab666e7af49edb7e24cc9 (patch) | |
tree | 8e1995e6ddb3836923f50e915294664aa27b7511 /cli/args/flags_allow_net.rs | |
parent | a09296322e1fd4451e903515a497d9e02e14ace6 (diff) |
refactor: rename `deno` specifiers to `internal` (#17655)
Diffstat (limited to 'cli/args/flags_allow_net.rs')
-rw-r--r-- | cli/args/flags_allow_net.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/args/flags_allow_net.rs b/cli/args/flags_allow_net.rs index 88d9d3c02..94699cc8b 100644 --- a/cli/args/flags_allow_net.rs +++ b/cli/args/flags_allow_net.rs @@ -27,7 +27,7 @@ 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!("internal://{host_and_port}")).is_ok() || host_and_port.parse::<IpAddr>().is_ok() || host_and_port.parse::<BarePort>().is_ok() { @@ -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!("internal://{host_and_port}")).is_ok() || host_and_port.parse::<IpAddr>().is_ok() { out.push(host_and_port.to_owned()) |