Small improvements

This commit is contained in:
Mubelotix
2025-07-24 15:28:17 +02:00
parent ad06828685
commit a92e36ab83
2 changed files with 5 additions and 6 deletions

View File

@ -133,7 +133,7 @@ fn parse_vectors(input: Span) -> IResult<(Token, Option<Token>, VectorFilter<'_>
let (input, _) = char('.')(input)?;
// From this point, we are certain this is a vector filter, so our errors must be final.
// We could use nom's `cut`` but it's better to be explicit about the errors
// We could use nom's `cut` but it's better to be explicit about the errors
let (input, embedder_name) =
parse_vector_value(input).map_cut(ErrorKind::VectorFilterInvalidEmbedder)?;

View File

@ -78,6 +78,10 @@ pub enum ErrorKind<'a> {
GeoBoundingBox,
MisusedGeoRadius,
MisusedGeoBoundingBox,
VectorFilterLeftover,
VectorFilterInvalidEmbedder,
VectorFilterMissingFragment,
VectorFilterInvalidFragment,
InvalidPrimary,
InvalidEscapedNumber,
ExpectedEof,
@ -93,11 +97,6 @@ pub enum ErrorKind<'a> {
InternalError(error::ErrorKind),
DepthLimitReached,
External(String),
VectorFilterLeftover,
VectorFilterInvalidEmbedder,
VectorFilterMissingFragment,
VectorFilterInvalidFragment,
}
impl<'a> Error<'a> {