Skip to content

Commit 6dd3fa6

Browse files
committed
clippy: cast_lossless
1 parent a5da770 commit 6dd3fa6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/ra_lsp_server/src/conv.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl ConvWith for TextUnit {
6565
fn conv_with(self, line_index: &LineIndex) -> Position {
6666
let line_col = line_index.line_col(self);
6767
// 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)))
6969
}
7070
}
7171

@@ -192,7 +192,7 @@ impl TryConvWith for SourceChange {
192192
.map(|it| it.edits.as_slice())
193193
.unwrap_or(&[]);
194194
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)));
196196
Some(TextDocumentPositionParams {
197197
text_document: TextDocumentIdentifier::new(pos.file_id.try_conv_with(world)?),
198198
position,

0 commit comments

Comments
 (0)