From f3eea0d308fbd24c87a2d102520bdabe22e1b564 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 1 Nov 2024 14:48:41 -0500 Subject: [PATCH] refactor(logos): Remove extraneous dep See 1fa673dd4aaa24f9c9706a257b32c1416eb5255e --- Cargo.lock | 17 ----------------- examples/logos-app/Cargo.toml | 1 - examples/logos-app/app.rs | 17 +---------------- 3 files changed, 1 insertion(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7cd1c95..b9e31be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -35,16 +35,6 @@ version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" -[[package]] -name = "ariadne" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44055e597c674aef7cb903b2b9f6e4cba1277ed0d2d61dae7cd52d7ffa81f8e2" -dependencies = [ - "unicode-width", - "yansi", -] - [[package]] name = "ascii" version = "0.9.3" @@ -453,7 +443,6 @@ dependencies = [ name = "logos-app" version = "0.0.0" dependencies = [ - "ariadne", "logos", ] @@ -1325,12 +1314,6 @@ dependencies = [ "winnow", ] -[[package]] -name = "yansi" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" - [[package]] name = "yap" version = "0.12.0" diff --git a/examples/logos-app/Cargo.toml b/examples/logos-app/Cargo.toml index a69ecd9..2ca9125 100644 --- a/examples/logos-app/Cargo.toml +++ b/examples/logos-app/Cargo.toml @@ -8,4 +8,3 @@ path = "app.rs" [dependencies] logos = "0.14.0" -ariadne = "0.4.1" diff --git a/examples/logos-app/app.rs b/examples/logos-app/app.rs index 1a38236..b979eab 100644 --- a/examples/logos-app/app.rs +++ b/examples/logos-app/app.rs @@ -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}"); } } }