tolerate None
return from get_line
This commit is contained in:
parent
2bade8133c
commit
d82d4b66f2
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue