mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-26 16:21:39 +00:00
Address edition-2018 idioms. (#929)
This commit is contained in:
committed by
Pierre Krieger
parent
21810e46bd
commit
eeed66707b
@ -66,7 +66,7 @@ impl error::Error for ProtocolChoiceError {
|
||||
}
|
||||
}
|
||||
|
||||
fn cause(&self) -> Option<&error::Error> {
|
||||
fn cause(&self) -> Option<&dyn error::Error> {
|
||||
match *self {
|
||||
ProtocolChoiceError::MultistreamSelectError(ref err) => Some(err),
|
||||
_ => None,
|
||||
@ -76,7 +76,7 @@ impl error::Error for ProtocolChoiceError {
|
||||
|
||||
impl fmt::Display for ProtocolChoiceError {
|
||||
#[inline]
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
|
||||
write!(fmt, "{}", error::Error::description(self))
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ impl error::Error for MultistreamSelectError {
|
||||
}
|
||||
}
|
||||
|
||||
fn cause(&self) -> Option<&error::Error> {
|
||||
fn cause(&self) -> Option<&dyn error::Error> {
|
||||
match *self {
|
||||
MultistreamSelectError::IoError(ref err) => Some(err),
|
||||
_ => None,
|
||||
@ -87,7 +87,7 @@ impl error::Error for MultistreamSelectError {
|
||||
|
||||
impl fmt::Display for MultistreamSelectError {
|
||||
#[inline]
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
|
||||
write!(fmt, "{}", error::Error::description(self))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user