mirror of
https://github.com/haraldh/chainerror.git
synced 2025-01-31 00:56:41 +01:00
cargo fmt
This commit is contained in:
parent
f5457a2a51
commit
2f8c68b36d
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue