fix(report): get rid of the weird arrow thing. it does not look good

This commit is contained in:
Kat Marchán 2021-09-09 22:10:44 -07:00
parent ecc705d95d
commit 1ba3f2f5d2
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
2 changed files with 14 additions and 25 deletions

View File

@ -102,18 +102,7 @@ impl GraphicalReportHandler {
writeln!(f, "{}", self.theme.characters.hbar.to_string().repeat(20),)?;
writeln!(f)?;
write!(f, " {} ", severity_icon.style(severity_style))?;
if diagnostic.source().is_some() {
write!(f, "{}", self.theme.characters.mtop.style(severity_style))?;
} else {
write!(f, "{}", self.theme.characters.hbar.style(severity_style))?;
}
writeln!(
f,
"{}{} {}",
self.theme.characters.hbar.style(severity_style),
self.theme.characters.rarrow.style(severity_style),
diagnostic,
)?;
writeln!(f, "{}", diagnostic,)?;
Ok(())
}
@ -133,7 +122,7 @@ impl GraphicalReportHandler {
self.theme.characters.lbot
};
let prefix = format!(
" {}{}{}",
" {}{}{}",
char, self.theme.characters.hbar, self.theme.characters.rarrow
)
.style(severity_style)

View File

@ -48,7 +48,7 @@ fn single_line_highlight() -> Result<(), MietteError> {
let expected = r#"
[oops::my::bad]
× oops!
× oops!
[bad_file.rs:1:1] This is the part that broke:
1 source
@ -91,7 +91,7 @@ fn single_line_highlight_offset_zero() -> Result<(), MietteError> {
let expected = r#"
[oops::my::bad]
× oops!
× oops!
[bad_file.rs:1:1] This is the part that broke:
1 source
@ -134,7 +134,7 @@ fn single_line_highlight_with_empty_span() -> Result<(), MietteError> {
let expected = r#"
[oops::my::bad]
× oops!
× oops!
[bad_file.rs:1:1] This is the part that broke:
1 source
@ -177,7 +177,7 @@ fn single_line_highlight_no_label() -> Result<(), MietteError> {
let expected = r#"
[oops::my::bad]
× oops!
× oops!
[bad_file.rs:1:1] This is the part that broke:
1 source
@ -222,7 +222,7 @@ fn multiple_same_line_highlights() -> Result<(), MietteError> {
let expected = r#"
[oops::my::bad]
× oops!
× oops!
[bad_file.rs:1:1] This is the part that broke:
1 source
@ -266,7 +266,7 @@ fn multiline_highlight_adjacent() -> Result<(), MietteError> {
let expected = r#"
[oops::my::bad]
× oops!
× oops!
[bad_file.rs:1:1] This is the part that broke:
1 source
@ -317,7 +317,7 @@ line5
let expected = r#"
[oops::my::bad]
× oops!
× oops!
[bad_file.rs:1:1] This is the part that broke:
1 line1
@ -382,9 +382,9 @@ line5
let expected = r#"
[oops::my::bad]
× wtf?!
something went wrong
very much went wrong
× wtf?!
something went wrong
very much went wrong
[bad_file.rs:1:1] This is the part that broke:
1 line1
@ -431,7 +431,7 @@ fn multiple_multiline_highlights_adjacent() -> Result<(), MietteError> {
let expected = r#"
[oops::my::bad]
× oops!
× oops!
[bad_file.rs:1:1] This is the part that broke:
1 source
@ -577,7 +577,7 @@ fn unnamed_snippet_shows_message() {
let expected = r#"
[oops::my::bad]
× oops!
× oops!
[1:1] This is the part that broke:
1 source_text_here