#error #terminal #console #utilities

bin+lib highlight_error

Highlights an error for printing

2 releases

0.1.1 Jul 14, 2022
0.1.0 Jul 14, 2022

#175 in #console

Download history 153/week @ 2024-07-26 277/week @ 2024-08-02 238/week @ 2024-08-09 160/week @ 2024-08-16 161/week @ 2024-08-23 214/week @ 2024-08-30 155/week @ 2024-09-06 151/week @ 2024-09-13 150/week @ 2024-09-20 122/week @ 2024-09-27 136/week @ 2024-10-04 129/week @ 2024-10-11 143/week @ 2024-10-18 118/week @ 2024-10-25 158/week @ 2024-11-01 116/week @ 2024-11-08

568 downloads per month
Used in 19 crates (6 directly)

MIT license

16KB
97 lines

Highlight Error

Rust util that highlights an error.

Example

The code below:

fn main() {
  let code = "functon is_zero (x) {
    if (x == 0) [
      return true;
    ] else {
      return false;
    }
  }";
  println!("{}", highlight_error::highlight_error(38, 64, &code));
}

Will output:

example.png

No runtime deps