EscapeUnicode
and EscapeDefault
are ExactSizeIterator
s
In #28662, `size_hint` was made exact for `EscapeUnicode` and `EscapeDefault`, but neither was marked as `ExactSizeIterator`.
This commit is contained in:
parent
d5759a3417
commit
c30fa92a0a
@ -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.
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user