From 70a9859adce478180a15d43877fe239a44379556 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 24 Jun 2019 19:10:21 +0200 Subject: refactor: use Path/PathBuf in deno dir (#2559) --- cli/compiler.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cli/compiler.rs') diff --git a/cli/compiler.rs b/cli/compiler.rs index b6fb0375c..dc30758b2 100644 --- a/cli/compiler.rs +++ b/cli/compiler.rs @@ -11,6 +11,7 @@ use crate::worker::Worker; use deno::Buf; use futures::Future; use futures::Stream; +use std::path::PathBuf; use std::str; use std::sync::atomic::Ordering; @@ -20,12 +21,12 @@ use std::sync::atomic::Ordering; pub struct ModuleMetaData { pub module_name: String, pub module_redirect_source_name: Option, // source of redirect - pub filename: String, + pub filename: PathBuf, pub media_type: msg::MediaType, pub source_code: Vec, - pub maybe_output_code_filename: Option, + pub maybe_output_code_filename: Option, pub maybe_output_code: Option>, - pub maybe_source_map_filename: Option, + pub maybe_source_map_filename: Option, pub maybe_source_map: Option>, } @@ -214,7 +215,6 @@ pub fn compile_async( }).and_then(move |_| { state.dir.fetch_module_meta_data_async( &module_name, - ".", true, true, ).map_err(|e| { @@ -256,7 +256,7 @@ mod tests { let mut out = ModuleMetaData { module_name, module_redirect_source_name: None, - filename: "/tests/002_hello.ts".to_owned(), + filename: PathBuf::from("/tests/002_hello.ts"), media_type: msg::MediaType::TypeScript, source_code: include_bytes!("../tests/002_hello.ts").to_vec(), maybe_output_code_filename: None, -- cgit v1.2.3