Trim trailing whitespace in error message

This commit is contained in:
David Tolnay 2019-03-02 00:35:17 -08:00
parent 2e7bd2581c
commit 72cd7e8dd9
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -122,7 +122,7 @@ fn render_location(
linenum = start.line,
colnum = start.column,
indent = " ".repeat(start.line.to_string().len()),
code = code_line,
code = code_line.trim_end(),
offset = " ".repeat(start.column),
underline = "^".repeat(end.column - start.column),
message = err,