Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6f6e343

Browse files
authored
Rollup merge ofrust-lang#127091 - Sky9x:fused-error-sources-iter, r=dtolnay
impl FusedIterator and a size hint for the error sources itercc tracking issuerust-lang#58520
2 parentsc5f1c76 +e26c881 commit6f6e343

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎core/src/error.rs‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,8 +1008,15 @@ impl<'a> Iterator for Source<'a> {
10081008
self.current =self.current.and_then(Error::source);
10091009
current
10101010
}
1011+
1012+
fnsize_hint(&self) ->(usize,Option<usize>){
1013+
ifself.current.is_some(){(1,None)}else{(0,Some(0))}
1014+
}
10111015
}
10121016

1017+
#[unstable(feature ="error_iter", issue ="58520")]
1018+
impl<'a>crate::iter::FusedIteratorforSource<'a>{}
1019+
10131020
#[stable(feature ="error_by_ref", since ="1.51.0")]
10141021
impl<'a,T:Error + ?Sized>Errorfor&'aT{
10151022
#[allow(deprecated, deprecated_in_future)]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp