LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
Merge PR #2709
Brandon Thomas4d9914d4dbd3
diff --cc crates/engine/src/cmd/cull.rsindex 691577515,ec6f59feb..f6600c6b1--- a/crates/engine/src/cmd/cull.rs+++ b/crates/engine/src/cmd/cull.rs@@@ -115,9 -115,8 +115,10 @@@ fn find_similar(s: &mut Session, p: &Va}hits.sort_by(|a, b| b.1.total_cmp(&a.1));if p.get("filter").and_then(Value::as_bool).unwrap_or(true) {+ s.shelved_filter = None;s.filter.only = hits.iter().map(|h| h.0).collect();+ // an empty `only` means "no constraint": no hits is its own state that shows no photos+ s.filter.only_none = s.filter.only.is_empty();}Ok(json!({"photos": hits.iter().map(|(i, v)| json!({"id": i.0, "similarity": (v * 1000.0).round() / 1000.0})).collect::<Vec<_>>()}))}