summaryrefslogtreecommitdiff
path: root/cli/tools
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools')
-rw-r--r--cli/tools/check.rs2
-rw-r--r--cli/tools/repl/mod.rs2
-rw-r--r--cli/tools/vendor/test.rs8
3 files changed, 8 insertions, 4 deletions
diff --git a/cli/tools/check.rs b/cli/tools/check.rs
index 0c57af0b0..6e2ccd4ff 100644
--- a/cli/tools/check.rs
+++ b/cli/tools/check.rs
@@ -58,7 +58,7 @@ pub fn check(
roots: &[(ModuleSpecifier, ModuleKind)],
graph_data: Arc<RwLock<GraphData>>,
cache: &TypeCheckCache,
- npm_resolver: NpmPackageResolver,
+ npm_resolver: &NpmPackageResolver,
options: CheckOptions,
) -> Result<CheckResult, AnyError> {
let check_js = options.ts_config.get_check_js();
diff --git a/cli/tools/repl/mod.rs b/cli/tools/repl/mod.rs
index 929a1b5d8..fc03dee2f 100644
--- a/cli/tools/repl/mod.rs
+++ b/cli/tools/repl/mod.rs
@@ -183,5 +183,5 @@ pub async fn run(flags: Flags, repl_flags: ReplFlags) -> Result<i32, AnyError> {
}
}
- Ok(repl_session.worker.get_exit_code())
+ Ok(repl_session.worker.exit_code())
}
diff --git a/cli/tools/vendor/test.rs b/cli/tools/vendor/test.rs
index 61c885731..7171b8463 100644
--- a/cli/tools/vendor/test.rs
+++ b/cli/tools/vendor/test.rs
@@ -242,7 +242,7 @@ impl VendorTestBuilder {
let import_map = files.remove(&output_dir.join("import_map.json"));
let mut files = files
.iter()
- .map(|(path, text)| (path_to_string(path), text.clone()))
+ .map(|(path, text)| (path_to_string(path), text.to_string()))
.collect::<Vec<_>>();
files.sort_by(|a, b| a.0.cmp(&b.0));
@@ -293,7 +293,11 @@ fn make_path(text: &str) -> PathBuf {
}
}
-fn path_to_string(path: &Path) -> String {
+fn path_to_string<P>(path: P) -> String
+where
+ P: AsRef<Path>,
+{
+ let path = path.as_ref();
// inverse of the function above
let path = path.to_string_lossy();
if cfg!(windows) {