From 78b0bce9a1bff60f3fc386b11b6c3b7df2e22be7 Mon Sep 17 00:00:00 2001 From: Tamo Date: Wed, 22 Sep 2021 11:37:05 +0200 Subject: [PATCH] fix the returned error when asc desc fails to be parsed --- milli/src/criterion.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/milli/src/criterion.rs b/milli/src/criterion.rs index 24879cdd4..c526a7e32 100644 --- a/milli/src/criterion.rs +++ b/milli/src/criterion.rs @@ -156,7 +156,7 @@ impl FromStr for AscDesc { match text.rsplit_once(':') { Some((left, "asc")) => Ok(AscDesc::Asc(left.parse()?)), Some((left, "desc")) => Ok(AscDesc::Desc(left.parse()?)), - _ => Err(UserError::InvalidRankingRuleName { name: text.to_string() }), + _ => Err(UserError::InvalidAscDescSyntax { name: text.to_string() }), } } }