зеркало из
https://github.com/glebtv/tui-textarea.git
synced 2026-09-07 16:05:50 +03:00
perfer for to while
Этот коммит содержится в:
@@ -169,12 +169,11 @@ impl<'a> LineHighlighter<'a> {
|
|||||||
o => o,
|
o => o,
|
||||||
});
|
});
|
||||||
|
|
||||||
let mut boundaries = boundaries.into_iter();
|
|
||||||
let mut style = style_begin;
|
let mut style = style_begin;
|
||||||
let mut start = 0;
|
let mut start = 0;
|
||||||
let mut stack = vec![];
|
let mut stack = vec![];
|
||||||
|
|
||||||
while let Some((next_boundary, end)) = boundaries.next() {
|
for (next_boundary, end) in boundaries {
|
||||||
if start < end {
|
if start < end {
|
||||||
spans.push(Span::styled(builder.build(&line[start..end]), style));
|
spans.push(Span::styled(builder.build(&line[start..end]), style));
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user