diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2021-09-02 17:38:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-02 17:38:19 +0200 |
commit | c84532b6d5a424694c519260f0cf407b1d8ba604 (patch) | |
tree | b0cd78f2f851ceb8b8b92fc146e8e5d29b263505 /cli/lsp/analysis.rs | |
parent | 77ead8af20180453aa2d0db67d7856641bd5498f (diff) |
chore: upgrade crates (#11894)
Co-authored-by: David Sherret <dsherret@gmail.com>
Diffstat (limited to 'cli/lsp/analysis.rs')
-rw-r--r-- | cli/lsp/analysis.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cli/lsp/analysis.rs b/cli/lsp/analysis.rs index 17fdf5d4c..4c5f1fea7 100644 --- a/cli/lsp/analysis.rs +++ b/cli/lsp/analysis.rs @@ -120,12 +120,12 @@ impl Reference { fn as_lsp_range(range: &deno_lint::diagnostic::Range) -> Range { Range { start: Position { - line: (range.start.line - 1) as u32, - character: range.start.col as u32, + line: range.start.line_index as u32, + character: range.start.column_index as u32, }, end: Position { - line: (range.end.line - 1) as u32, - character: range.end.col as u32, + line: range.end.line_index as u32, + character: range.end.column_index as u32, }, } } @@ -1172,13 +1172,13 @@ mod tests { fn test_as_lsp_range() { let fixture = deno_lint::diagnostic::Range { start: deno_lint::diagnostic::Position { - line: 1, - col: 2, + line_index: 0, + column_index: 2, byte_pos: 23, }, end: deno_lint::diagnostic::Position { - line: 2, - col: 0, + line_index: 1, + column_index: 0, byte_pos: 33, }, }; |