mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
Fix last few warnings manually
This commit is contained in:
parent
816f7fe12a
commit
8318035726
@ -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<E: serde::de::Error>(self, value: &str) -> Result<Self::Value, E> {
|
||||
@ -1405,7 +1405,7 @@ where
|
||||
impl<'de> serde::de::Visitor<'de> for SingleOrVec {
|
||||
type Value = Vec<String>;
|
||||
|
||||
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")
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@ pub(crate) fn diff(left: &str, right: &str) -> TextEdit {
|
||||
textedit_from_chunks(chunks)
|
||||
}
|
||||
|
||||
fn textedit_from_chunks(chunks: Vec<dissimilar::Chunk>) -> TextEdit {
|
||||
fn textedit_from_chunks(chunks: Vec<dissimilar::Chunk<'_>>) -> TextEdit {
|
||||
let mut builder = TextEdit::builder();
|
||||
let mut pos = TextSize::default();
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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()
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user