From 78345673ba3a9aa3ecea88fdbb965a0917edb8b1 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Wed, 15 Jan 2025 00:44:34 -0500 Subject: [PATCH] Fix error report for ariadne 0.5 --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 2b0f19a..46b5d18 100644 --- a/src/main.rs +++ b/src/main.rs @@ -36,7 +36,8 @@ fn main() { parsed.into_output().expect("no output from parser without errors") } else { let mut colors = ColorGenerator::new(); - let mut report = Report::build(ReportKind::Error, "input", 0).with_message("Unable to parse dice expression"); + let mut report = + Report::build(ReportKind::Error, ("input", 0..input.len())).with_message("Unable to parse dice expression"); for err in parsed.errors() { report.add_label(