diff --git a/filter_parser/src/lib.rs b/filter_parser/src/lib.rs index d09744196..a1d66819f 100644 --- a/filter_parser/src/lib.rs +++ b/filter_parser/src/lib.rs @@ -60,12 +60,18 @@ pub type Span<'a> = LocatedSpan<&'a str, &'a str>; type IResult<'a, Ret> = nom::IResult, Ret, Error<'a>>; -#[derive(Debug, Clone, PartialEq, Eq)] +#[derive(Debug, Clone, Eq)] pub struct Token<'a> { pub position: Span<'a>, pub inner: &'a str, } +impl<'a> PartialEq for Token<'a> { + fn eq(&self, other: &Self) -> bool { + self.inner == other.inner + } +} + impl<'a> Token<'a> { pub fn new(position: Span<'a>) -> Self { Self { position, inner: &position }