mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-01 22:17:53 -06:00
Update crates/catalog/src/query.rs
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
parent
8fe7198dbd
commit
e4da1d1db7
@@ -187,8 +187,8 @@ fn token_matches(p: &Photo, tok: &str) -> bool {
|
||||
let cmp = |x: f64, s: &str| match num(s) {
|
||||
Some((">", v)) => x > v,
|
||||
Some(("<", v)) => x < v,
|
||||
Some((">=", v)) => x > v || (x - v).abs() < 1e-9,
|
||||
Some(("<=", v)) => x < v || (x - v).abs() < 1e-9,
|
||||
Some((">=", v)) => x >= v,
|
||||
Some(("<=", v)) => x <= v,
|
||||
Some((_, v)) => (x - v).abs() < 1e-9,
|
||||
None => false,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user