diff options
author | Alan Du <[email protected]> | 2018-10-18 00:27:49 +0100 |
---|---|---|
committer | Alan Du <[email protected]> | 2018-10-18 00:42:23 +0100 |
commit | 6dd3fa6a947a4442e46ac042ff955a7f17bd6a0f (patch) | |
tree | d2093a43bf4d04dfb65283e7e7edbb511121225f | |
parent | a5da770ec60a73abcc5350f25146be973540063f (diff) |
clippy: cast_lossless
-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, |