From 8318035726c9e2fc2bcb6055855969cb97512b69 Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Wed, 20 Jul 2022 15:05:02 +0200 Subject: [PATCH] Fix last few warnings manually --- crates/rust-analyzer/src/config.rs | 6 +++--- crates/rust-analyzer/src/diff.rs | 2 +- crates/rust-analyzer/src/lib.rs | 2 +- crates/rust-analyzer/src/main_loop.rs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 8fa9df4e69a0..ac0fdf85a774 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -1277,7 +1277,7 @@ macro_rules! create_bool_or_string_de { impl<'de> serde::de::Visitor<'de> for V { type Value = (); - fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { formatter.write_str(concat!( stringify!($bool), " or \"", @@ -1344,7 +1344,7 @@ macro_rules! named_unit_variant { struct V; impl<'de> serde::de::Visitor<'de> for V { type Value = (); - fn expecting(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.write_str(concat!("\"", stringify!($variant), "\"")) } fn visit_str(self, value: &str) -> Result { @@ -1405,7 +1405,7 @@ where impl<'de> serde::de::Visitor<'de> for SingleOrVec { type Value = Vec; - fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { formatter.write_str("string or array of strings") } diff --git a/crates/rust-analyzer/src/diff.rs b/crates/rust-analyzer/src/diff.rs index 231be5807783..3fcfb4a1b08a 100644 --- a/crates/rust-analyzer/src/diff.rs +++ b/crates/rust-analyzer/src/diff.rs @@ -7,7 +7,7 @@ pub(crate) fn diff(left: &str, right: &str) -> TextEdit { textedit_from_chunks(chunks) } -fn textedit_from_chunks(chunks: Vec) -> TextEdit { +fn textedit_from_chunks(chunks: Vec>) -> TextEdit { let mut builder = TextEdit::builder(); let mut pos = TextSize::default(); diff --git a/crates/rust-analyzer/src/lib.rs b/crates/rust-analyzer/src/lib.rs index 4b1e0cd5aeb4..552379752fa6 100644 --- a/crates/rust-analyzer/src/lib.rs +++ b/crates/rust-analyzer/src/lib.rs @@ -72,7 +72,7 @@ impl LspError { } impl fmt::Display for LspError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "Language Server request failed with {}. ({})", self.code, self.message) } } diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs index 0579cae4ed0d..5845cf712c89 100644 --- a/crates/rust-analyzer/src/main_loop.rs +++ b/crates/rust-analyzer/src/main_loop.rs @@ -75,8 +75,8 @@ pub(crate) enum PrimeCachesProgress { } impl fmt::Debug for Event { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let debug_verbose_not = |not: &Notification, f: &mut fmt::Formatter| { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let debug_verbose_not = |not: &Notification, f: &mut fmt::Formatter<'_>| { f.debug_struct("Notification").field("method", ¬.method).finish() };