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/compilers/ts.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cli/compilers') diff --git a/cli/compilers/ts.rs b/cli/compilers/ts.rs index d1fb3a6ac..d0c0d87c0 100644 --- a/cli/compilers/ts.rs +++ b/cli/compilers/ts.rs @@ -170,7 +170,7 @@ fn req( request_type: msg::CompilerRequestType, root_names: Vec, compiler_config: CompilerConfig, - out_file: Option, + out_file: Option, target: &str, bundle: bool, ) -> Buf { @@ -275,7 +275,7 @@ impl TsCompiler { &self, global_state: GlobalState, module_name: String, - out_file: Option, + out_file: Option, ) -> Result<(), ErrBox> { debug!( "Invoking the compiler to bundle. module_name: {}", @@ -743,7 +743,7 @@ mod tests { .bundle_async( state.clone(), module_name, - Some(String::from("$deno$/bundle.js")), + Some(PathBuf::from("$deno$/bundle.js")), ) .await; assert!(result.is_ok()); -- cgit v1.2.3