diff --git a/crates/highlight/src/lib.rs b/crates/highlight/src/lib.rs index 0928e1a04c..d077315941 100644 --- a/crates/highlight/src/lib.rs +++ b/crates/highlight/src/lib.rs @@ -14,7 +14,6 @@ pub fn highlight_roc_code_inline(code: &str) -> String { } pub fn highlight(code: &str) -> Vec { - let locations: Vec> = roc_parse::highlight::highlight(code); let mut buf: Vec = Vec::new(); let mut offset = 0; @@ -29,8 +28,8 @@ pub fn highlight(code: &str) -> Vec { } else { code }; - - for location in locations { + + for location in roc_parse::highlight::highlight(code) { let current_text = &code[offset..location.byte_range().end]; match location.value {