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 11# Unreleased
22
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 )
45- [ Add a new method for ` Error ` : ` chain_err ` .] ( https://github.com/brson/error-chain/pull/141 )
56- [ Allow ` chain_err ` to be used on ` Option<T> ` ] ( https://github.com/brson/error-chain/pull/156 )
67- [ 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;
493493#[ cfg( feature = "example_generated" ) ]
494494pub mod example_generated;
495495
496+ #[ derive( Debug ) ]
496497/// Iterator over the error chain using the `Error::cause()` method.
497498pub struct ErrorChainIter < ' a > ( pub Option < & ' a error:: Error > ) ;
498499
Original file line number Diff line number Diff line change @@ -358,6 +358,7 @@ mod foreign_link_test {
358358 fn iterates ( ) {
359359 let chained_error = try_foreign_error ( ) . err ( ) . unwrap ( ) ;
360360 let mut error_iter = chained_error. iter ( ) ;
361+ assert ! ( !format!( "{:?}" , error_iter) . is_empty( ) ) ;
361362 assert_eq ! ( format!( "{}" , ForeignError { cause: ForeignErrorCause { } } ) ,
362363 format!( "{}" , error_iter. next( ) . unwrap( ) ) ) ;
363364 assert_eq ! ( format!( "{}" , ForeignErrorCause { } ) ,
You can’t perform that action at this time.
0 commit comments