Address review comments.
This commit is contained in:
parent
0b81d7cdc6
commit
72de7c4102
3 changed files with 70 additions and 51 deletions
|
@ -356,12 +356,12 @@ impl SourceMap {
|
|||
// compiler backend can optimize away the repeated computations in a
|
||||
// way that won't trigger overflow checks.
|
||||
match &mut *file_local_lines.borrow_mut() {
|
||||
SourceFileLines::Lines { lines } => {
|
||||
SourceFileLines::Lines(lines) => {
|
||||
for pos in lines {
|
||||
*pos = (*pos - original_start_pos) + start_pos;
|
||||
}
|
||||
}
|
||||
SourceFileLines::Diffs { line_start, .. } => {
|
||||
SourceFileLines::Diffs(SourceFileDiffs { line_start, .. }) => {
|
||||
*line_start = (*line_start - original_start_pos) + start_pos;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue