mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
avoid converting types into themselves via .into() (clippy::useless-conversion)
example: let x: String = String::from("hello world").into();
This commit is contained in:
parent
83e6940efb
commit
966c23f529
24 changed files with 56 additions and 61 deletions
|
@ -36,7 +36,7 @@ impl Progress {
|
|||
|
||||
impl GlobalState {
|
||||
pub(crate) fn show_message(&mut self, typ: lsp_types::MessageType, message: String) {
|
||||
let message = message.into();
|
||||
let message = message;
|
||||
self.send_notification::<lsp_types::notification::ShowMessage>(
|
||||
lsp_types::ShowMessageParams { typ, message },
|
||||
)
|
||||
|
|
|
@ -287,7 +287,7 @@ pub(crate) fn signature_help(
|
|||
let params = call_info
|
||||
.parameter_ranges()
|
||||
.iter()
|
||||
.map(|it| [u32::from(it.start()).into(), u32::from(it.end()).into()])
|
||||
.map(|it| [u32::from(it.start()), u32::from(it.end())])
|
||||
.map(|label_offsets| lsp_types::ParameterInformation {
|
||||
label: lsp_types::ParameterLabel::LabelOffsets(label_offsets),
|
||||
documentation: None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue