Skip to content

Commit 01af316

Browse files
committed
Fix incorrect copy-pasted code
It's late.
1 parent a907d9a commit 01af316

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libcore/char.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -905,12 +905,12 @@ impl<I: Iterator<Item = u8>> Iterator for DecodeUtf8<I> {
905905

906906
#[inline]
907907
fn size_hint(&self) -> (usize, Option<usize>) {
908-
let len = self.0.len();
908+
let (lower, upper) = self.0.size_hint();
909909

910910
// A code point is at most 4 bytes long.
911-
let min_code_points = len / 4;
911+
let min_code_points = lower / 4;
912912

913-
(min_code_points, Some(len))
913+
(min_code_points, upper)
914914
}
915915
}
916916

0 commit comments

Comments
 (0)