Skip to content

Commit

Permalink
tolerate None return from get_line
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Jan 17, 2017
1 parent 2bade81 commit d82d4b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libsyntax/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ impl DiagnosticSpanLine {
h_end: usize)
-> DiagnosticSpanLine {
DiagnosticSpanLine {
text: fm.get_line(index).unwrap().to_owned(),
text: fm.get_line(index).unwrap_or("").to_owned(),
highlight_start: h_start,
highlight_end: h_end,
}
Expand Down

0 comments on commit d82d4b6

Please sign in to comment.