diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-06-07 10:09:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-07 10:09:10 -0400 |
commit | da9db887e34f0075e1433ee93854267aec0ef468 (patch) | |
tree | cb10d061c4d28933524a26d62d7ca4957d95a443 /cli/tools/bench.rs | |
parent | 28ce0ef583b1be03f5ec4fdd90b946590862c5d4 (diff) |
refactor: helpers methods on `TypeCheckMode` (#19393)
Diffstat (limited to 'cli/tools/bench.rs')
-rw-r--r-- | cli/tools/bench.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/cli/tools/bench.rs b/cli/tools/bench.rs index 6461e544f..a7b75d8be 100644 --- a/cli/tools/bench.rs +++ b/cli/tools/bench.rs @@ -2,7 +2,6 @@ use crate::args::BenchOptions; use crate::args::CliOptions; -use crate::args::TypeCheckMode; use crate::colors; use crate::display::write_json_to_stdout; use crate::factory::CliFactory; @@ -31,7 +30,6 @@ use deno_core::task::spawn; use deno_core::task::spawn_blocking; use deno_core::v8; use deno_core::ModuleSpecifier; -use deno_graph::GraphKind; use deno_runtime::permissions::Permissions; use deno_runtime::permissions::PermissionsContainer; use deno_runtime::tokio_util::create_and_run_current_thread; @@ -694,11 +692,7 @@ pub async fn run_benchmarks_with_watch( // file would have impact on other files, which is undesirable. let permissions = Permissions::from_options(&cli_options.permissions_options())?; - let type_check = cli_options.type_check_mode() != TypeCheckMode::None; - let graph_kind = match type_check { - true => GraphKind::All, - false => GraphKind::CodeOnly, - }; + let graph_kind = cli_options.type_check_mode().as_graph_kind(); let resolver = |changed: Option<Vec<PathBuf>>| { let paths_to_watch = bench_options.files.include.clone(); |