diff options
author | Matt Mastracci <matthew@mastracci.com> | 2024-03-22 14:03:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-22 14:03:56 -0700 |
commit | 86cdf3703399367836c89accba3756437d820bb0 (patch) | |
tree | 986ab6c88e0a65ffaadb164eab94d44c0ff497b1 /cli/args/flags.rs | |
parent | 08ec6e5831478f6d15188e91d9a8e3c00d80c1ed (diff) |
perf(cli): use args_os (#23039)
Extracted from #22718
Diffstat (limited to 'cli/args/flags.rs')
-rw-r--r-- | cli/args/flags.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 22c7d8e6d..283ebc9a3 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -17,6 +17,7 @@ use deno_runtime::permissions::parse_sys_kind; use log::debug; use log::Level; use std::env; +use std::ffi::OsString; use std::net::SocketAddr; use std::num::NonZeroU32; use std::num::NonZeroU8; @@ -909,7 +910,7 @@ To evaluate code in the shell: ); /// Main entry point for parsing deno's command line flags. -pub fn flags_from_vec(args: Vec<String>) -> clap::error::Result<Flags> { +pub fn flags_from_vec(args: Vec<OsString>) -> clap::error::Result<Flags> { let mut app = clap_root(); let mut matches = app.try_get_matches_from_mut(&args)?; @@ -4294,7 +4295,7 @@ mod tests { /// Creates vector of strings, Vec<String> macro_rules! svec { - ($($x:expr),* $(,)?) => (vec![$($x.to_string()),*]); + ($($x:expr),* $(,)?) => (vec![$($x.to_string().into()),*]); } #[test] |