Update std::fmt import
This commit is contained in:
parent
d30e035d41
commit
03b7d7e190
10
src/lib.rs
10
src/lib.rs
@ -117,7 +117,7 @@
|
|||||||
use std::{
|
use std::{
|
||||||
collections::BTreeMap,
|
collections::BTreeMap,
|
||||||
error::Error,
|
error::Error,
|
||||||
fmt::{Debug, Display, Formatter, Result as FmtResult},
|
fmt::{self, Debug, Display, Formatter},
|
||||||
time::SystemTime,
|
time::SystemTime,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ impl InvalidEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Display for InvalidEvent {
|
impl Display for InvalidEvent {
|
||||||
fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
|
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
|
||||||
write!(f, "{}", self.message())
|
write!(f, "{}", self.message())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -236,7 +236,7 @@ impl Error for InvalidEvent {}
|
|||||||
pub struct InvalidInput(String);
|
pub struct InvalidInput(String);
|
||||||
|
|
||||||
impl Display for InvalidInput {
|
impl Display for InvalidInput {
|
||||||
fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
|
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
|
||||||
write!(f, "{}", self.0)
|
write!(f, "{}", self.0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -307,7 +307,7 @@ where
|
|||||||
pub struct FromStrError;
|
pub struct FromStrError;
|
||||||
|
|
||||||
impl Display for FromStrError {
|
impl Display for FromStrError {
|
||||||
fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
|
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
|
||||||
write!(f, "failed to parse type from string")
|
write!(f, "failed to parse type from string")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -340,7 +340,7 @@ impl<'de> Deserialize<'de> for Empty {
|
|||||||
impl<'de> Visitor<'de> for EmptyMapVisitor {
|
impl<'de> Visitor<'de> for EmptyMapVisitor {
|
||||||
type Value = Empty;
|
type Value = Empty;
|
||||||
|
|
||||||
fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
|
fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result {
|
||||||
write!(f, "an object/map")
|
write!(f, "an object/map")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user