Run the formatter over the face branch before it reaches CI
🐳 Android image / Build and push (push) Successful in 2s
Build and test / android-image (push) Successful in 2s
Build and test / Desktop (Linux) (push) Successful in 1h21m32s
Build and test / Layer separation (push) Successful in 37s
Traceability / Requirement traces (push) Successful in 25s
Build and test / Android (aarch64) (push) Failing after 33m58s

The merge of the SCRFD/MobileFaceNet work brought 69 rustfmt diffs across
dr-catalog, dr-face and dr-ui with it, so `cargo fmt --all -- --check` fails
on master and the Desktop job stops at its Format step — before clippy, the
tests or the release build have run at all. That makes the whole desktop
half of CI blind: a real compile error behind this would look exactly the
same from the outside. There was nothing behind it, as it turns out — with
the formatting fixed, clippy, the test suite and the release build all pass.

Every .rs hunk is `cargo fmt --all` on the pinned 1.92.0 toolchain, not a
hand edit, but it is worth being precise about what that moved, because it
is more than whitespace. Besides reflowing signatures and call chains,
rustfmt reordered the `pub mod` and `pub use` items in dr-face/src/lib.rs so
the `#[cfg(feature = "inference")]` entries sort in place, added the trailing
semicolon inside `let ... else { return }` bodies in identity_ui.rs, wrapped
a bare closure body in braces in cluster.rs, adjusted trailing commas, and
dropped a stray blank line at the end of identity_ui.rs. All of it is
semantically inert; none of it changes behaviour.

docs/traceability.md rides along because it has to. The matrix records each
TRACES tag by line number, and reflowing develop.rs, lib.rs, faces.rs,
identity.rs and identity_ui.rs moved them — FR-CAT-8, FR-CAT-9, FR-CULL-10,
FR-DEV-3, FR-DEV-3a and FR-DEV-3c all shift by a line or two. The matrix was
verified up to date on d777f7f before this commit, so this is drift these
formatting changes introduced, not pre-existing staleness being swept up.
Leaving it for a follow-up commit would hand traceability-check.yml a
failure caused entirely by a whitespace change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-27 13:12:49 +02:00
co-authored by Claude Opus 5
parent d777f7f44d
commit b846b312b8
18 changed files with 285 additions and 207 deletions
+21 -17
View File
@@ -109,8 +109,7 @@ pub fn refresh(
// Drop portraits for people who no longer exist, so a long session that
// merges and splits repeatedly does not accumulate them.
{
let live: std::collections::HashSet<PersonId> =
view.people.iter().map(|p| p.id).collect();
let live: std::collections::HashSet<PersonId> = view.people.iter().map(|p| p.id).collect();
ctl.covers.borrow_mut().retain(|id, _| live.contains(id));
}
@@ -152,8 +151,8 @@ pub fn refresh(
match (ctl.selected.get(), store) {
(Some(person), Some(store)) => {
let cells = identity::load_faces(cat, store, person, view.calibrated)
.unwrap_or_else(|e| {
let cells =
identity::load_faces(cat, store, person, view.calibrated).unwrap_or_else(|e| {
log::warn!("identity: reading faces: {e}");
Vec::new()
});
@@ -335,7 +334,9 @@ pub fn wire<S, M, P>(
let store = store.clone();
window.on_identity_rename(move |name| {
let Some(w) = weak.upgrade() else { return };
let Some(person) = ctl.selected.get() else { return };
let Some(person) = ctl.selected.get() else {
return;
};
if let Some(cat) = catalog.borrow().as_ref() {
if let Err(e) = identity::rename(cat, person, &name) {
log::warn!("identity: rename: {e}");
@@ -352,7 +353,9 @@ pub fn wire<S, M, P>(
let store = store.clone();
window.on_identity_confirm_face(move |id| {
let Some(w) = weak.upgrade() else { return };
let Some(person) = ctl.selected.get() else { return };
let Some(person) = ctl.selected.get() else {
return;
};
if let Some(cat) = catalog.borrow().as_ref() {
if let Err(e) = identity::confirm(cat, FaceId(id as u64), person) {
log::warn!("identity: confirm: {e}");
@@ -369,7 +372,9 @@ pub fn wire<S, M, P>(
let store = store.clone();
window.on_identity_reject_face(move |id| {
let Some(w) = weak.upgrade() else { return };
let Some(person) = ctl.selected.get() else { return };
let Some(person) = ctl.selected.get() else {
return;
};
if let Some(cat) = catalog.borrow().as_ref() {
if let Err(e) = identity::reject(cat, FaceId(id as u64), person) {
log::warn!("identity: reject: {e}");
@@ -408,7 +413,9 @@ pub fn wire<S, M, P>(
let store = store.clone();
window.on_identity_confirm_all(move || {
let Some(w) = weak.upgrade() else { return };
let Some(person) = ctl.selected.get() else { return };
let Some(person) = ctl.selected.get() else {
return;
};
if let Some(cat) = catalog.borrow().as_ref() {
match identity::confirm_all(cat, person) {
Ok(n) => log::info!("identity: confirmed {n} suggestion(s)"),
@@ -426,7 +433,9 @@ pub fn wire<S, M, P>(
let store = store.clone();
window.on_identity_split_picked(move || {
let Some(w) = weak.upgrade() else { return };
let Some(person) = ctl.selected.get() else { return };
let Some(person) = ctl.selected.get() else {
return;
};
let members: Vec<FaceId> = ctl.picked.borrow().clone();
if members.is_empty() {
return;
@@ -488,10 +497,8 @@ pub fn wire<S, M, P>(
ctl.progress.set((0, 0));
ctl.faces_found.set(0);
*ctl.activity.borrow_mut() = Some(activity.begin(
crate::activity::Kind::Index,
"Indexing faces",
));
*ctl.activity.borrow_mut() =
Some(activity.begin(crate::activity::Kind::Index, "Indexing faces"));
*ctl.sweep.borrow_mut() = Some(crate::faces::spawn_face_sweep(
catalog_path,
store_dir,
@@ -531,9 +538,7 @@ pub fn wire<S, M, P>(
FaceSweepMessage::Indexed { faces, .. } => {
let (seen, total) = ctl_tick.progress.get();
ctl_tick.progress.set((seen + 1, total));
ctl_tick
.faces_found
.set(ctl_tick.faces_found.get() + faces);
ctl_tick.faces_found.set(ctl_tick.faces_found.get() + faces);
}
FaceSweepMessage::Finished { .. } => done = true,
}
@@ -671,4 +676,3 @@ mod tests {
assert!(ctl.picked.borrow().is_empty());
}
}