cargo fmt

This commit is contained in:
Harald Hoyer 2019-02-07 08:57:50 +01:00
parent f5457a2a51
commit 2f8c68b36d

View file

@ -302,7 +302,8 @@ impl<T: 'static + Display + Debug> ChainError<T> {
pub fn find_kind_or_cause<U: Error + 'static>(&self) -> Option<&U> {
self.iter()
.filter_map(|e| {
e.downcast_ref::<ChainError<U>>().map(|e| e.kind())
e.downcast_ref::<ChainError<U>>()
.map(|e| e.kind())
.or_else(|| e.downcast_ref::<U>())
})
.next()