We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 90a2326 + cc7093f commit dde0567Copy full SHA for dde0567
library/core/src/error.rs
@@ -1008,8 +1008,19 @@ impl<'a> Iterator for Source<'a> {
1008
self.current = self.current.and_then(Error::source);
1009
current
1010
}
1011
+
1012
+ fn size_hint(&self) -> (usize, Option<usize>) {
1013
+ if self.current.is_some() {
1014
+ (1, None)
1015
+ } else {
1016
+ (0, Some(0))
1017
+ }
1018
1019
1020
1021
+#[unstable(feature = "error_iter", issue = "58520")]
1022
+impl<'a> crate::iter::FusedIterator for Source<'a> {}
1023
1024
#[stable(feature = "error_by_ref", since = "1.51.0")]
1025
impl<'a, T: Error + ?Sized> Error for &'a T {
1026
#[allow(deprecated, deprecated_in_future)]
0 commit comments