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:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user