This repository was archived by the owner on Aug 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
1
# Unreleased
2
2
3
- - [ Rename ` ChanedError::display ` to ` display_chain ` ] ( https://github.com/brson/error-chain/issues/180 )
3
+ - [ Implement ` Debug ` for ` ErrorChainIter ` ] ( https://github.com/brson/error-chain/issues/169 )
4
+ - [ Rename ` ChainedError::display ` to ` display_chain ` ] ( https://github.com/brson/error-chain/issues/180 )
4
5
- [ Add a new method for ` Error ` : ` chain_err ` .] ( https://github.com/brson/error-chain/pull/141 )
5
6
- [ Allow ` chain_err ` to be used on ` Option<T> ` ] ( https://github.com/brson/error-chain/pull/156 )
6
7
- [ Add support for creating an error chain on boxed trait errors (` Box<Error> ` )] ( https://github.com/brson/error-chain/pull/156 )
Original file line number Diff line number Diff line change @@ -493,6 +493,7 @@ pub use quick_main::ExitCode;
493
493
#[ cfg( feature = "example_generated" ) ]
494
494
pub mod example_generated;
495
495
496
+ #[ derive( Debug ) ]
496
497
/// Iterator over the error chain using the `Error::cause()` method.
497
498
pub struct ErrorChainIter < ' a > ( pub Option < & ' a error:: Error > ) ;
498
499
Original file line number Diff line number Diff line change @@ -358,6 +358,7 @@ mod foreign_link_test {
358
358
fn iterates ( ) {
359
359
let chained_error = try_foreign_error ( ) . err ( ) . unwrap ( ) ;
360
360
let mut error_iter = chained_error. iter ( ) ;
361
+ assert ! ( !format!( "{:?}" , error_iter) . is_empty( ) ) ;
361
362
assert_eq ! ( format!( "{}" , ForeignError { cause: ForeignErrorCause { } } ) ,
362
363
format!( "{}" , error_iter. next( ) . unwrap( ) ) ) ;
363
364
assert_eq ! ( format!( "{}" , ForeignErrorCause { } ) ,
You can’t perform that action at this time.
0 commit comments