7373impl < I > ExactSizeIterator for ExactlyOneError < I > where I : ExactSizeIterator { }
7474
7575impl < I > Display for ExactlyOneError < I >
76- where I : Iterator
76+ where I : Iterator ,
7777{
7878 fn fmt ( & self , f : & mut Formatter ) -> FmtResult {
7979 let additional = self . additional_len ( ) ;
@@ -86,25 +86,25 @@ impl<I> Display for ExactlyOneError<I>
8686}
8787
8888impl < I > Debug for ExactlyOneError < I >
89- where I : Iterator ,
89+ where I : Iterator + Debug ,
9090 I :: Item : Debug ,
9191{
9292 fn fmt ( & self , f : & mut Formatter ) -> FmtResult {
9393 match & self . first_two {
9494 Some ( Either :: Left ( [ first, second] ) ) => {
95- write ! ( f, "ExactlyOneError[{:?}, {:?}, ... ]" , first, second)
95+ write ! ( f, "ExactlyOneError[First: {:?}, Second: {:?}, RemainingIter: {:?} ]" , first, second, self . inner )
9696 } ,
9797 Some ( Either :: Right ( second) ) => {
98- write ! ( f, "ExactlyOneError[{:?}, ... ]" , second)
98+ write ! ( f, "ExactlyOneError[Second: {:?}, RemainingIter: {:?} ]" , second, self . inner )
9999 }
100100 None => {
101- write ! ( f, "ExactlyOneError[...]" )
101+ write ! ( f, "ExactlyOneError[RemainingIter: {:?}]" , self . inner )
102102 }
103103 }
104104 }
105105}
106106
107107#[ cfg( feature = "use_std" ) ]
108- impl < I > Error for ExactlyOneError < I > where I : Iterator , I :: Item : Debug , { }
108+ impl < I > Error for ExactlyOneError < I > where I : Iterator + Debug , I :: Item : Debug , { }
109109
110110
0 commit comments