Fix clippy lints (#387)

This commit is contained in:
Martin Algesten
2021-05-12 03:05:17 +02:00
committed by GitHub
parent c06c345f28
commit 989995d1ba
2 changed files with 4 additions and 9 deletions

View File

@@ -180,10 +180,9 @@ impl error::Error for Error {
impl error::Error for Transport {
fn source(&self) -> Option<&(dyn error::Error + 'static)> {
match &self.source {
Some(s) => Some(s.as_ref()),
None => None,
}
self.source
.as_ref()
.map(|s| s.as_ref() as &(dyn error::Error + 'static))
}
}