mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-26 05:44:26 +00:00
Implement FusedIterator for DecodeUtf16 when the inner iterator does
This commit is contained in:
parent
3462f79e94
commit
60fd119a29
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user