Small changes to region rendering

This commit is contained in:
Chad Stearns 2020-03-15 20:57:32 -04:00
parent 349857a468
commit 009e1fa176
2 changed files with 6 additions and 6 deletions

View file

@ -116,12 +116,12 @@ impl ReportText {
Region(region) => { Region(region) => {
for i in region.start_line..=region.end_line { for i in region.start_line..=region.end_line {
buf.push_str(i.to_string().as_str()); buf.push_str(i.to_string().as_str());
buf.push_str(" |"); buf.push_str(" ");
let line = src_lines[i as usize]; let line = src_lines[i as usize];
if !line.is_empty() { if !line.is_empty() {
buf.push(' '); buf.push_str(" ");
buf.push_str(src_lines[i as usize]); buf.push_str(src_lines[i as usize]);
} }

View file

@ -218,7 +218,7 @@ mod test_report {
r#" r#"
x = 1 x = 1
y = 2 y = 2
f = \a -> a + 4 f = \a -> a + 4
f x f x
"# "#
@ -231,9 +231,9 @@ mod test_report {
})), })),
indoc!( indoc!(
r#" r#"
1 | y = 2 1 y = 2
2 | f = \a -> a + 4 2 f = \a -> a + 4
3 |"# 3 "#
), ),
); );
} }