diff options
Diffstat (limited to 'crates/ra_lsp_server/src/conv.rs')
-rw-r--r-- | crates/ra_lsp_server/src/conv.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs index 8325e8c1e..bc0cf7c68 100644 --- a/crates/ra_lsp_server/src/conv.rs +++ b/crates/ra_lsp_server/src/conv.rs | |||
@@ -65,7 +65,7 @@ impl ConvWith for TextUnit { | |||
65 | fn conv_with(self, line_index: &LineIndex) -> Position { | 65 | fn conv_with(self, line_index: &LineIndex) -> Position { |
66 | let line_col = line_index.line_col(self); | 66 | let line_col = line_index.line_col(self); |
67 | // TODO: UTF-16 | 67 | // TODO: UTF-16 |
68 | Position::new(line_col.line as u64, u32::from(line_col.col) as u64) | 68 | Position::new(u64::from(line_col.line), u64::from(u32::from(line_col.col))) |
69 | } | 69 | } |
70 | } | 70 | } |
71 | 71 | ||
@@ -192,7 +192,7 @@ impl TryConvWith for SourceChange { | |||
192 | .map(|it| it.edits.as_slice()) | 192 | .map(|it| it.edits.as_slice()) |
193 | .unwrap_or(&[]); | 193 | .unwrap_or(&[]); |
194 | let line_col = translate_offset_with_edit(&*line_index, pos.offset, edits); | 194 | let line_col = translate_offset_with_edit(&*line_index, pos.offset, edits); |
195 | let position = Position::new(line_col.line as u64, u32::from(line_col.col) as u64); | 195 | let position = Position::new(u64::from(line_col.line), u64::from(u32::from(line_col.col))); |
196 | Some(TextDocumentPositionParams { | 196 | Some(TextDocumentPositionParams { |
197 | text_document: TextDocumentIdentifier::new(pos.file_id.try_conv_with(world)?), | 197 | text_document: TextDocumentIdentifier::new(pos.file_id.try_conv_with(world)?), |
198 | position, | 198 | position, |