Add more error handling
This commit is contained in:
parent
9065bfd7b4
commit
5b5e491cb2
4 changed files with 144 additions and 57 deletions
|
|
@ -62,7 +62,7 @@ impl SourceCode for SourceFile {
|
|||
}
|
||||
})
|
||||
.map(|x| x + span.offset())
|
||||
.unwrap_or(data[span.offset()..].len());
|
||||
.unwrap_or(data.len());
|
||||
|
||||
let compact_data = &data[start_pos..end_pos];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue