73
73
impl < I > ExactSizeIterator for ExactlyOneError < I > where I : ExactSizeIterator { }
74
74
75
75
impl < I > Display for ExactlyOneError < I >
76
- where I : Iterator
76
+ where I : Iterator ,
77
77
{
78
78
fn fmt ( & self , f : & mut Formatter ) -> FmtResult {
79
79
let additional = self . additional_len ( ) ;
@@ -86,25 +86,25 @@ impl<I> Display for ExactlyOneError<I>
86
86
}
87
87
88
88
impl < I > Debug for ExactlyOneError < I >
89
- where I : Iterator ,
89
+ where I : Iterator + Debug ,
90
90
I :: Item : Debug ,
91
91
{
92
92
fn fmt ( & self , f : & mut Formatter ) -> FmtResult {
93
93
match & self . first_two {
94
94
Some ( Either :: Left ( [ first, second] ) ) => {
95
- write ! ( f, "ExactlyOneError[{:?}, {:?}, ... ]" , first, second)
95
+ write ! ( f, "ExactlyOneError[First: {:?}, Second: {:?}, RemainingIter: {:?} ]" , first, second, self . inner )
96
96
} ,
97
97
Some ( Either :: Right ( second) ) => {
98
- write ! ( f, "ExactlyOneError[{:?}, ... ]" , second)
98
+ write ! ( f, "ExactlyOneError[Second: {:?}, RemainingIter: {:?} ]" , second, self . inner )
99
99
}
100
100
None => {
101
- write ! ( f, "ExactlyOneError[...]" )
101
+ write ! ( f, "ExactlyOneError[RemainingIter: {:?}]" , self . inner )
102
102
}
103
103
}
104
104
}
105
105
}
106
106
107
107
#[ 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 , { }
109
109
110
110
0 commit comments