diff options
author | Martin Fischer <martin@push-f.com> | 2023-06-26 15:10:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-26 09:10:27 -0400 |
commit | 801b9ec62d94f201e67d053ee90dae0b70e50a42 (patch) | |
tree | 145f840c570dd72258ef309e9d31f100a5aa5786 /cli/tools/coverage/mod.rs | |
parent | ad3c494b46c97f0cf91098b7ec2afa576ea7a3dd (diff) |
chore: fix typos (#19572)
Diffstat (limited to 'cli/tools/coverage/mod.rs')
-rw-r--r-- | cli/tools/coverage/mod.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/tools/coverage/mod.rs b/cli/tools/coverage/mod.rs index 223bac316..c872623b8 100644 --- a/cli/tools/coverage/mod.rs +++ b/cli/tools/coverage/mod.rs @@ -132,12 +132,12 @@ impl CoverageCollector { let mut out = BufWriter::new(File::create(filepath)?); let coverage = serde_json::to_string(&script_coverage)?; - let formated_coverage = format_json(&coverage, &Default::default()) + let formatted_coverage = format_json(&coverage, &Default::default()) .ok() .flatten() .unwrap_or(coverage); - out.write_all(formated_coverage.as_bytes())?; + out.write_all(formatted_coverage.as_bytes())?; out.flush()?; } @@ -533,20 +533,20 @@ impl CoverageReporter for PrettyCoverageReporter { let mut last_line = None; for line_index in missed_lines { const WIDTH: usize = 4; - const SEPERATOR: &str = "|"; + const SEPARATOR: &str = "|"; // Put a horizontal separator between disjoint runs of lines if let Some(last_line) = last_line { if last_line + 1 != line_index { let dash = colors::gray("-".repeat(WIDTH + 1)); - println!("{}{}{}", dash, colors::gray(SEPERATOR), dash); + println!("{}{}{}", dash, colors::gray(SEPARATOR), dash); } } println!( "{:width$} {} {}", line_index + 1, - colors::gray(SEPERATOR), + colors::gray(SEPARATOR), colors::red(&lines[line_index]), width = WIDTH ); @@ -703,7 +703,7 @@ pub async fn cover_files( | MediaType::Mts | MediaType::Cts | MediaType::Tsx => { - match emitter.maybed_cached_emit(&file.specifier, &file.source) { + match emitter.maybe_cached_emit(&file.specifier, &file.source) { Some(code) => code.into(), None => { return Err(anyhow!( |