summaryrefslogtreecommitdiff
path: root/cli/tools/coverage/mod.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-04-13 14:03:07 -0400
committerGitHub <noreply@github.com>2023-04-13 18:03:07 +0000
commitd192d84a0e0b9954882211b827f17512ad37be7d (patch)
tree2aa50a9a3785a34097fab0acd1ab245313994ff7 /cli/tools/coverage/mod.rs
parent6e8618ae0f55bcaa4cfaaa579b4e21f9f74b117d (diff)
refactor(cli): add `Emitter` struct (#18690)
Removes the functions in the `emit` module and replaces them with an `Emitter` struct that can have "ctor dependencies" injected rather than using functions to pass along the dependencies. This is part of a long term refactor to move more functionality out of proc state.
Diffstat (limited to 'cli/tools/coverage/mod.rs')
-rw-r--r--cli/tools/coverage/mod.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/cli/tools/coverage/mod.rs b/cli/tools/coverage/mod.rs
index 87c983600..75ee833b0 100644
--- a/cli/tools/coverage/mod.rs
+++ b/cli/tools/coverage/mod.rs
@@ -4,7 +4,6 @@ use crate::args::CoverageFlags;
use crate::args::FileFlags;
use crate::args::Flags;
use crate::colors;
-use crate::emit::get_source_hash;
use crate::proc_state::ProcState;
use crate::tools::fmt::format_json;
use crate::util::fs::FileCollector;
@@ -698,7 +697,7 @@ pub async fn cover_files(
| MediaType::Mts
| MediaType::Cts
| MediaType::Tsx => {
- let source_hash = get_source_hash(&file.source, ps.emit_options_hash);
+ let source_hash = ps.emitter.get_source_hash(&file.source);
match ps.emit_cache.get_emit_code(&file.specifier, source_hash) {
Some(code) => code.into(),
None => {