diff options
| author | Colin Finck <colin@reactos.org> | 2023-04-23 18:22:58 +0200 |
|---|---|---|
| committer | Colin Finck <colin@reactos.org> | 2023-04-24 13:34:36 +0200 |
| commit | 60fd119a293b56529c4a49f60103679eaced0aed (patch) | |
| tree | 6f0c5e82b026d4cf7f0e9964527f9f76594e9a25 /library/core/src/char | |
| parent | 3462f79e94f466a56ddaccfcdd3a3d44dd1dda9f (diff) | |
| download | rust-60fd119a293b56529c4a49f60103679eaced0aed.tar.gz rust-60fd119a293b56529c4a49f60103679eaced0aed.zip | |
Implement FusedIterator for DecodeUtf16 when the inner iterator does
Diffstat (limited to 'library/core/src/char')
| -rw-r--r-- | library/core/src/char/decode.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/library/core/src/char/decode.rs b/library/core/src/char/decode.rs index dbfe251f2bb..d76f983d87c 100644 --- a/library/core/src/char/decode.rs +++ b/library/core/src/char/decode.rs @@ -2,6 +2,7 @@ use crate::error::Error; use crate::fmt; +use crate::iter::FusedIterator; /// An iterator that decodes UTF-16 encoded code points from an iterator of `u16`s. /// @@ -105,6 +106,9 @@ impl<I: Iterator<Item = u16>> Iterator for DecodeUtf16<I> { } } +#[stable(feature = "decode_utf16_fused_iterator", since = "CURRENT_RUSTC_VERSION")] +impl<I: Iterator<Item = u16> + FusedIterator> FusedIterator for DecodeUtf16<I> {} + impl DecodeUtf16Error { /// Returns the unpaired surrogate which caused this error. #[must_use] |
