From 701ce9b3342647cf01cb23c4fc28bc99ce0aa8c1 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Tue, 11 Feb 2020 09:29:36 +0000 Subject: refactor: Use PathBuf for paths in flag parsing and whitelists (#3955) * Use PathBuf for DenoSubcommand::Bundle's out_file * Use PathBuf for DenoSubcommand::Format's files * Use PathBuf for DenoSubcommand::Install's dir * Use PathBuf for read/write whitelists --- cli/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cli/lib.rs') diff --git a/cli/lib.rs b/cli/lib.rs index 4e100127b..f6d12d21d 100644 --- a/cli/lib.rs +++ b/cli/lib.rs @@ -72,6 +72,7 @@ use log::Level; use log::Metadata; use log::Record; use std::env; +use std::path::PathBuf; static LOGGER: Logger = Logger; @@ -258,7 +259,7 @@ async fn info_command(flags: DenoFlags, file: Option) { async fn install_command( flags: DenoFlags, - dir: Option, + dir: Option, exe_name: String, module_url: String, args: Vec, @@ -331,7 +332,7 @@ async fn eval_command(flags: DenoFlags, code: String) { async fn bundle_command( flags: DenoFlags, source_file: String, - out_file: Option, + out_file: Option, ) { debug!(">>>>> bundle_async START"); let source_file_specifier = @@ -404,7 +405,7 @@ async fn run_script(flags: DenoFlags, script: String) { js_check(worker.execute("window.dispatchEvent(new Event('unload'))")); } -async fn fmt_command(files: Option>, check: bool) { +async fn fmt_command(files: Option>, check: bool) { if let Err(err) = fmt::format_files(files, check) { print_err_and_exit(err); } -- cgit v1.2.3