Apply suggestions from code review

Co-authored-by: Harry Maclean <hmac@github.com>
This commit is contained in:
Arthur Baars
2023-02-01 09:47:39 +01:00
committed by GitHub
parent 57012714d6
commit fa81d9da18
3 changed files with 20 additions and 20 deletions

View File

@@ -588,8 +588,8 @@ fn location_for(visitor: &mut Visitor, n: Node) -> (usize, usize, usize, usize)
if index > 0 && index <= source.len() {
index -= 1;
if source[index] != b'\n' {
&visitor.diagnostics_writer.write(
&visitor
visitor.diagnostics_writer.write(
visitor
.diagnostics_writer
.message("internal-error", "Internal error")
.text("expecting a line break symbol, but none found while correcting end column value")
@@ -604,8 +604,8 @@ fn location_for(visitor: &mut Visitor, n: Node) -> (usize, usize, usize, usize)
end_col += 1;
}
} else {
&visitor.diagnostics_writer.write(
&visitor
visitor.diagnostics_writer.write(
visitor
.diagnostics_writer
.message("internal-error", "Internal error")
.text(&format!(