Description
unicode-segmentation/src/sentence.rs
Lines 178 to 182 in 9e3f88c
According to the Iterator documentation on size_hint
…
returns a tuple where the first element is the lower bound, and the second element is the upper bound.
… and …
A buggy iterator may yield less than the lower bound or more than the upper bound of elements.
This however returns what is almost the upper bound of the iterator as the lower one.
A quickfix would be changing the return statement to:
(2, Some(slen + 1))
Same problem for the word iterator:
unicode-segmentation/src/word.rs
Lines 206 to 209 in 9e3f88c
Similar problem in the grapheme iterators:
unicode-segmentation/src/grapheme.rs
Lines 110 to 113 in 9e3f88c