Skip to content

Commit

Permalink
Merge pull request #80 from epage/drop
Browse files Browse the repository at this point in the history
refactor(logos): Remove extraneous dep
  • Loading branch information
epage authored Nov 1, 2024
2 parents f88d915 + f3eea0d commit e6ae0e8
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 e6ae0e8

Please sign in to comment.