Skip to content

Commit 8318035

Browse files
Fix last few warnings manually
1 parent 816f7fe commit 8318035

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,7 +1277,7 @@ macro_rules! create_bool_or_string_de {
12771277
impl<'de> serde::de::Visitor<'de> for V {
12781278
type Value = ();
12791279

1280-
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
1280+
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
12811281
formatter.write_str(concat!(
12821282
stringify!($bool),
12831283
" or \"",
@@ -1344,7 +1344,7 @@ macro_rules! named_unit_variant {
13441344
struct V;
13451345
impl<'de> serde::de::Visitor<'de> for V {
13461346
type Value = ();
1347-
fn expecting(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1347+
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13481348
f.write_str(concat!("\"", stringify!($variant), "\""))
13491349
}
13501350
fn visit_str<E: serde::de::Error>(self, value: &str) -> Result<Self::Value, E> {
@@ -1405,7 +1405,7 @@ where
14051405
impl<'de> serde::de::Visitor<'de> for SingleOrVec {
14061406
type Value = Vec<String>;
14071407

1408-
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
1408+
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14091409
formatter.write_str("string or array of strings")
14101410
}
14111411

crates/rust-analyzer/src/diff.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pub(crate) fn diff(left: &str, right: &str) -> TextEdit {
77
textedit_from_chunks(chunks)
88
}
99

10-
fn textedit_from_chunks(chunks: Vec<dissimilar::Chunk>) -> TextEdit {
10+
fn textedit_from_chunks(chunks: Vec<dissimilar::Chunk<'_>>) -> TextEdit {
1111
let mut builder = TextEdit::builder();
1212
let mut pos = TextSize::default();
1313

crates/rust-analyzer/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl LspError {
7272
}
7373

7474
impl fmt::Display for LspError {
75-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
75+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7676
write!(f, "Language Server request failed with {}. ({})", self.code, self.message)
7777
}
7878
}

crates/rust-analyzer/src/main_loop.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ pub(crate) enum PrimeCachesProgress {
7575
}
7676

7777
impl fmt::Debug for Event {
78-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
79-
let debug_verbose_not = |not: &Notification, f: &mut fmt::Formatter| {
78+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
79+
let debug_verbose_not = |not: &Notification, f: &mut fmt::Formatter<'_>| {
8080
f.debug_struct("Notification").field("method", &not.method).finish()
8181
};
8282

0 commit comments

Comments
 (0)