Make EncodeWide implement FusedIterator

This commit is contained in:
Aron Parker 2022-04-25 18:38:47 +02:00
parent 7417110cef
commit fc6af819c4

View File

@ -25,7 +25,7 @@ use crate::char;
use crate::collections::TryReserveError;
use crate::fmt;
use crate::hash::{Hash, Hasher};
use crate::iter::FromIterator;
use crate::iter::{FromIterator, FusedIterator};
use crate::mem;
use crate::ops;
use crate::rc::Rc;
@ -899,6 +899,9 @@ impl<'a> Iterator for EncodeWide<'a> {
}
}
#[stable(feature = "encode_wide_fused_iterator", since = "1.62.0")]
impl FusedIterator for EncodeWide<'_> {}
impl Hash for CodePoint {
#[inline]
fn hash<H: Hasher>(&self, state: &mut H) {