fix readable output for |-separated filters
This commit is contained in:
parent
bd6e92fa2d
commit
a91a93f0e2
@ -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(())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user