fix: Correct grammar and parsing for filter strings

Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-09-10 16:23:12 -03:00
parent 508b545861
commit 0bf01e3105

View File

@@ -7,8 +7,6 @@ use serde_json;
#[grammar = "filter.pest"]
pub struct FilterParser;
use FilterParser::Rule;
#[derive(Debug)]
pub struct Filter {
pub name: String,
@@ -67,7 +65,7 @@ pub fn parse_filter_string(input: &str) -> Result<Vec<Filter>, Box<dyn std::erro
}
fn parse_option_value(input: &str) -> Result<serde_json::Value, Box<dyn std::error::Error>> {
serde_json::from_str(input).map_err(|e| Box::new(e) as Box<dyn std::error::Error + Send + Sync>)
serde_json::from_str(input).map_err(|e| Box::new(e) as Box<dyn std::error::Error + Send + Sync + 'static>)
}
#[cfg(test)]