avoid converting types into themselves via .into() (clippy::useless-conversion)

example: let x: String = String::from("hello world").into();
This commit is contained in:
Matthias Krüger 2021-03-17 01:27:56 +01:00
parent 83e6940efb
commit 966c23f529
24 changed files with 56 additions and 61 deletions

View file

@ -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 },
)

View file

@ -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,