text-processing: small line_break.rs fix

jmap
Manos Pitsidianakis 2019-11-21 15:39:56 +02:00
parent 41d039992c
commit c62c04e1e7
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 3 additions and 0 deletions

View File

@ -670,6 +670,9 @@ impl<'a> Iterator for LineBreakCandidateIter<'a> {
self.iter.next(); self.iter.next();
return self.next(); return self.next();
} }
_ if next_char.is_none() => {
return None;
}
_ => { _ => {
*pos += grapheme.len(); *pos += grapheme.len();
return Some((*pos - grapheme.len(), BreakAllowed)); return Some((*pos - grapheme.len(), BreakAllowed));