From 6c22de87fb23f3f88074ae98213fc8390b8cdcb8 Mon Sep 17 00:00:00 2001 From: Tim Fennis Date: Tue, 6 May 2025 08:56:02 +0200 Subject: [PATCH] Improved an error message related to indexing --- ndc_lib/src/interpreter/num.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndc_lib/src/interpreter/num.rs b/ndc_lib/src/interpreter/num.rs index 44a5b5b4..6754cbd2 100644 --- a/ndc_lib/src/interpreter/num.rs +++ b/ndc_lib/src/interpreter/num.rs @@ -599,7 +599,7 @@ implement_rounding!(round); pub enum NumberToUsizeError { #[error("cannot convert from {0} to usize")] UnsupportedVariant(String), - #[error("failed to convert from int because of: '{0}'")] + #[error("expected non-negative integer for indexing")] FromIntError(#[from] TryFromIntError), #[error("failed to convert from bigint to number because of: '{0}'")] FromBigIntError(#[from] TryFromBigIntError),