EscapeUnicode and EscapeDefault are ExactSizeIterators

In #28662, `size_hint` was made exact for `EscapeUnicode` and
`EscapeDefault`, but neither was marked as `ExactSizeIterator`.
This commit is contained in:
Andrea Canciani 2015-12-30 10:08:28 +01:00
parent d5759a3417
commit c30fa92a0a

View File

@ -483,6 +483,9 @@ impl Iterator for EscapeUnicode {
}
}
#[stable(feature = "exact_size_escape", since = "1.11.0")]
impl ExactSizeIterator for EscapeUnicode { }
/// An iterator that yields the literal escape code of a `char`.
///
/// This `struct` is created by the [`escape_default()`] method on [`char`]. See
@ -578,6 +581,9 @@ impl Iterator for EscapeDefault {
}
}
#[stable(feature = "exact_size_escape", since = "1.11.0")]
impl ExactSizeIterator for EscapeDefault { }
/// An iterator over `u8` entries represending the UTF-8 encoding of a `char`
/// value.
///