mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Clippy lints
This commit is contained in:
parent
70a7cb34ec
commit
f32dc71351
5 changed files with 14 additions and 17 deletions
|
@ -63,10 +63,7 @@ impl ConvWith for TextUnit {
|
|||
|
||||
fn conv_with(self, line_index: &LineIndex) -> Position {
|
||||
let line_col = line_index.line_col(self);
|
||||
Position::new(
|
||||
u64::from(line_col.line),
|
||||
u64::from(u32::from(line_col.col_utf16)),
|
||||
)
|
||||
Position::new(u64::from(line_col.line), u64::from(line_col.col_utf16))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -204,10 +201,8 @@ impl TryConvWith for SourceChange {
|
|||
.map(|it| it.edits.as_slice())
|
||||
.unwrap_or(&[]);
|
||||
let line_col = translate_offset_with_edit(&*line_index, pos.offset, edits);
|
||||
let position = Position::new(
|
||||
u64::from(line_col.line),
|
||||
u64::from(u32::from(line_col.col_utf16)),
|
||||
);
|
||||
let position =
|
||||
Position::new(u64::from(line_col.line), u64::from(line_col.col_utf16));
|
||||
Some(TextDocumentPositionParams {
|
||||
text_document: TextDocumentIdentifier::new(pos.file_id.try_conv_with(world)?),
|
||||
position,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue