diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-10-26 13:41:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-26 13:41:09 -0400 |
commit | f0f476e58453d502ab5c118fc91d1475e6829967 (patch) | |
tree | c587c81f345a87cc5c61c36242230cb26321a5a9 /cli/tools | |
parent | d92d2fe9b0bd5e6e29cb3b6f924472aec972b636 (diff) |
perf: pass transpiled module to deno_core as known string (#26555)
Diffstat (limited to 'cli/tools')
-rw-r--r-- | cli/tools/coverage/mod.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/tools/coverage/mod.rs b/cli/tools/coverage/mod.rs index 260c0c842..3b08f2c77 100644 --- a/cli/tools/coverage/mod.rs +++ b/cli/tools/coverage/mod.rs @@ -571,7 +571,7 @@ pub async fn cover_files( | MediaType::Cjs | MediaType::Mjs | MediaType::Json => None, - MediaType::Dts | MediaType::Dmts | MediaType::Dcts => Some(Vec::new()), + MediaType::Dts | MediaType::Dmts | MediaType::Dcts => Some(String::new()), MediaType::TypeScript | MediaType::Jsx | MediaType::Mts @@ -593,8 +593,7 @@ pub async fn cover_files( } }; let runtime_code: String = match transpiled_code { - Some(code) => String::from_utf8(code) - .with_context(|| format!("Failed decoding {}", file.specifier))?, + Some(code) => code, None => original_source.to_string(), }; |