Update std::fmt import

This commit is contained in:
Jonas Platte 2020-04-22 01:44:51 +02:00
parent d30e035d41
commit 03b7d7e190
No known key found for this signature in database
GPG Key ID: 7D261D771D915378

View File

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