diff --git a/lib/src/sql/parser.rs b/lib/src/sql/parser.rs index e6cb0db8..a29cf47a 100644 --- a/lib/src/sql/parser.rs +++ b/lib/src/sql/parser.rs @@ -27,7 +27,7 @@ fn parse_impl(input: &str, parser: impl Fn(&str) -> IResult<&str, O>) -> Resu // Continue parsing the query _ => match parser(input) { // The query was parsed successfully - Ok((v, parsed)) if v.len() == 0 => Ok(parsed), + Ok((v, parsed)) if v.is_empty() => Ok(parsed), // There was unparsed SQL remaining Ok((_, _)) => Err(Error::QueryRemaining), // There was an error when parsing the query