fix readable output for |-separated filters

This commit is contained in:
kageru 2023-04-18 00:43:15 +02:00
parent bd6e92fa2d
commit a91a93f0e2
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2
2 changed files with 2 additions and 5 deletions

@ -167,7 +167,7 @@ fn add_searchbox(res: &mut String, query: &Option<String>) -> std::fmt::Result {
fn compute_results(raw_query: String) -> AnyResult<PageData> { fn compute_results(raw_query: String) -> AnyResult<PageData> {
let mut body = String::with_capacity(10_000); let mut body = String::with_capacity(10_000);
let (raw_filters, query) = match parser::parse_filters(&raw_query.trim()) { let (raw_filters, query) = match parser::parse_filters(raw_query.trim()) {
Ok(q) => q, Ok(q) => q,
Err(e) => { Err(e) => {
let s = format!("Could not parse query: {e:?}"); let s = format!("Could not parse query: {e:?}");

@ -251,10 +251,7 @@ impl Display for Value {
} }
Self::Numerical(n) => write!(f, "{n}"), Self::Numerical(n) => write!(f, "{n}"),
Self::Multiple(m) => { Self::Multiple(m) => {
for v in m { write!(f, "one of [{}]", m.iter().map(Value::to_string).join(", "))
write!(f, "{v} or ")?
}
Ok(())
} }
} }
} }