We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a907d9a commit 01af316Copy full SHA for 01af316
src/libcore/char.rs
@@ -905,12 +905,12 @@ impl<I: Iterator<Item = u8>> Iterator for DecodeUtf8<I> {
905
906
#[inline]
907
fn size_hint(&self) -> (usize, Option<usize>) {
908
- let len = self.0.len();
+ let (lower, upper) = self.0.size_hint();
909
910
// A code point is at most 4 bytes long.
911
- let min_code_points = len / 4;
+ let min_code_points = lower / 4;
912
913
- (min_code_points, Some(len))
+ (min_code_points, upper)
914
}
915
916
0 commit comments