File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ extern "C" tree_sitter_javascript();
1717Define the list of highlight names that you will recognize:
1818
1919``` rust
20- let highlight_names = [
20+ let highlight_names : Vec < String > = [
2121 " attribute" ,
2222 " constant" ,
2323 " function.builtin" ,
@@ -93,14 +93,14 @@ let highlights = highlighter.highlight(
9393). unwrap ();
9494
9595for event in highlights {
96- match event ? {
96+ match event . unwrap () {
9797 HighlightEvent :: Source {start , end } => {
9898 eprintln! (" source: {}-{}" , start , end );
9999 },
100- HighlightEvent :: HighlightStart (s ) {
100+ HighlightEvent :: HighlightStart (s ) => {
101101 eprintln! (" highlight style started: {:?}" , s );
102102 },
103- HighlightEvent :: HighlightEnd {
103+ HighlightEvent :: HighlightEnd => {
104104 eprintln! (" highlight style ended" );
105105 },
106106 }
You can’t perform that action at this time.
0 commit comments