From b278d37df19c2f62b4e2ab19894a7edb709e349e Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sun, 3 Jul 2022 18:48:54 +0200 Subject: [PATCH] Fix syntect update --- egui_demo_lib/src/syntax_highlighting.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/egui_demo_lib/src/syntax_highlighting.rs b/egui_demo_lib/src/syntax_highlighting.rs index 62c3625e3..db7808555 100644 --- a/egui_demo_lib/src/syntax_highlighting.rs +++ b/egui_demo_lib/src/syntax_highlighting.rs @@ -350,7 +350,7 @@ impl Highlighter { }; for line in LinesWithEndings::from(text) { - for (style, range) in h.highlight_line(line, &self.ps) { + for (style, range) in h.highlight_line(line, &self.ps).ok()? { let fg = style.foreground; let text_color = egui::Color32::from_rgb(fg.r, fg.g, fg.b); let italics = style.font_style.contains(FontStyle::ITALIC);