From 72194c5f5ecbc1dcdb66495e6caa7d24bbf80a7f Mon Sep 17 00:00:00 2001 From: Aron Parker Date: Mon, 25 Apr 2022 18:38:47 +0200 Subject: [PATCH] Make EncodeWide implement FusedIterator --- std/src/sys_common/wtf8.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/std/src/sys_common/wtf8.rs b/std/src/sys_common/wtf8.rs index 10ef66621..7d66973be 100644 --- a/std/src/sys_common/wtf8.rs +++ b/std/src/sys_common/wtf8.rs @@ -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(&self, state: &mut H) {