Skip to content

Commit

Permalink
refactor(logos): Remove extraneous dep
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Nov 1, 2024
1 parent f88d915 commit f3eea0d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 34 deletions.
17 changes: 0 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion examples/logos-app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ path = "app.rs"

[dependencies]
logos = "0.14.0"
ariadne = "0.4.1"
17 changes: 1 addition & 16 deletions examples/logos-app/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,7 @@ fn main() {
}
}
Err((msg, span)) => {
use ariadne::{ColorGenerator, Label, Report, ReportKind, Source};

let mut colors = ColorGenerator::new();

let a = colors.next();

Report::build(ReportKind::Error, &filename, 12)
.with_message(format!("Invalid JSON"))
.with_label(
Label::new((&filename, span))
.with_message(msg)
.with_color(a),
)
.finish()
.eprint((&filename, Source::from(src)))
.unwrap();
eprintln!("{filename}:{span:?}: {msg}");
}
}
}

0 comments on commit f3eea0d

Please sign in to comment.