diff --git a/src/exactly_one_err.rs b/src/exactly_one_err.rs index cfa244c18..63485c993 100644 --- a/src/exactly_one_err.rs +++ b/src/exactly_one_err.rs @@ -73,7 +73,7 @@ where impl ExactSizeIterator for ExactlyOneError where I: ExactSizeIterator {} impl Display for ExactlyOneError - where I: Iterator + where I: Iterator, { fn fmt(&self, f: &mut Formatter) -> FmtResult { let additional = self.additional_len(); @@ -86,25 +86,25 @@ impl Display for ExactlyOneError } impl Debug for ExactlyOneError - where I: Iterator, + where I: Iterator + Debug, I::Item: Debug, { fn fmt(&self, f: &mut Formatter) -> FmtResult { match &self.first_two { Some(Either::Left([first, second])) => { - write!(f, "ExactlyOneError[{:?}, {:?}, ...]", first, second) + write!(f, "ExactlyOneError[First: {:?}, Second: {:?}, RemainingIter: {:?}]", first, second, self.inner) }, Some(Either::Right(second)) => { - write!(f, "ExactlyOneError[{:?}, ...]", second) + write!(f, "ExactlyOneError[Second: {:?}, RemainingIter: {:?}]", second, self.inner) } None => { - write!(f, "ExactlyOneError[...]") + write!(f, "ExactlyOneError[RemainingIter: {:?}]", self.inner) } } } } #[cfg(feature = "use_std")] -impl Error for ExactlyOneError where I: Iterator, I::Item: Debug, {} +impl Error for ExactlyOneError where I: Iterator + Debug, I::Item: Debug, {}