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
🐳 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:
+53
-48
@@ -22,13 +22,13 @@
|
||||
mod activity;
|
||||
mod collections_ui;
|
||||
mod derived_sync;
|
||||
pub mod faces;
|
||||
pub mod identity;
|
||||
mod identity_ui;
|
||||
mod develop;
|
||||
mod export;
|
||||
pub mod faces;
|
||||
mod gradient;
|
||||
mod histogram;
|
||||
pub mod identity;
|
||||
mod identity_ui;
|
||||
mod import;
|
||||
mod import_ui;
|
||||
mod labels;
|
||||
@@ -1295,54 +1295,59 @@ pub fn run(paths: Vec<PathBuf>) -> Result<()> {
|
||||
let lib = library.clone();
|
||||
let ctl = settings.clone();
|
||||
let weak = window.as_weak();
|
||||
settings_ui::wire(&window, settings.clone(), move |s| {
|
||||
// A ceiling that moved has to be applied to what is already on
|
||||
// disk, or lowering it would only affect future downloads and the
|
||||
// cache would sit over budget indefinitely.
|
||||
lib.set_cache_budget(s.cache.original_budget_bytes);
|
||||
lib.set_keep_opened_originals(s.cache.keep_opened_originals);
|
||||
if let Some(w) = weak.upgrade() {
|
||||
refresh_export_label(&w, &ctl);
|
||||
}
|
||||
|
||||
// The axis is cut into bars when the window is loaded, so a new
|
||||
// count only shows once something reloads it. Done here, and only
|
||||
// when the figure actually moved: a setting that appears to do
|
||||
// nothing until the user scrolls is one they will change twice and
|
||||
// then leave wrong.
|
||||
if lib.set_timeline_bars(s.library.timeline_bars) {
|
||||
settings_ui::wire(
|
||||
&window,
|
||||
settings.clone(),
|
||||
move |s| {
|
||||
// A ceiling that moved has to be applied to what is already on
|
||||
// disk, or lowering it would only affect future downloads and the
|
||||
// cache would sit over budget indefinitely.
|
||||
lib.set_cache_budget(s.cache.original_budget_bytes);
|
||||
lib.set_keep_opened_originals(s.cache.keep_opened_originals);
|
||||
if let Some(w) = weak.upgrade() {
|
||||
library_ui::reload(&w, &lib);
|
||||
refresh_export_label(&w, &ctl);
|
||||
}
|
||||
}
|
||||
|
||||
// Lowering the ceiling evicts, so the figure beside it has just
|
||||
// changed — leaving the old one would show the cache still over a
|
||||
// limit that was enforced a moment ago.
|
||||
ctl.set_usage_label(describe_cache_usage(&lib));
|
||||
if let Some(w) = weak.upgrade() {
|
||||
settings_ui::render(&w, &ctl);
|
||||
}
|
||||
},
|
||||
{
|
||||
// Face coverage, read when the page opens. The figures live in the
|
||||
// catalog and the settings page holds no session, so they arrive
|
||||
// through here rather than being kept up to date continuously —
|
||||
// they are only ever looked at while this page is on screen.
|
||||
let lib = library.clone();
|
||||
let catalog = library.catalog();
|
||||
move |w: &AppWindow| {
|
||||
let store = lib.session().and_then(|(_, s)| {
|
||||
dr_thumbs::ThumbStore::open(&library::thumbs_dir(&s.server, &s.user_id)).ok()
|
||||
});
|
||||
identity_ui::refresh_coverage(w, &catalog, store.as_ref());
|
||||
w.set_identity_model_missing(
|
||||
lib.session()
|
||||
.and_then(|(_, s)| library::face_models(&s.server, &s.user_id))
|
||||
.is_none(),
|
||||
);
|
||||
}
|
||||
});
|
||||
// The axis is cut into bars when the window is loaded, so a new
|
||||
// count only shows once something reloads it. Done here, and only
|
||||
// when the figure actually moved: a setting that appears to do
|
||||
// nothing until the user scrolls is one they will change twice and
|
||||
// then leave wrong.
|
||||
if lib.set_timeline_bars(s.library.timeline_bars) {
|
||||
if let Some(w) = weak.upgrade() {
|
||||
library_ui::reload(&w, &lib);
|
||||
}
|
||||
}
|
||||
|
||||
// Lowering the ceiling evicts, so the figure beside it has just
|
||||
// changed — leaving the old one would show the cache still over a
|
||||
// limit that was enforced a moment ago.
|
||||
ctl.set_usage_label(describe_cache_usage(&lib));
|
||||
if let Some(w) = weak.upgrade() {
|
||||
settings_ui::render(&w, &ctl);
|
||||
}
|
||||
},
|
||||
{
|
||||
// Face coverage, read when the page opens. The figures live in the
|
||||
// catalog and the settings page holds no session, so they arrive
|
||||
// through here rather than being kept up to date continuously —
|
||||
// they are only ever looked at while this page is on screen.
|
||||
let lib = library.clone();
|
||||
let catalog = library.catalog();
|
||||
move |w: &AppWindow| {
|
||||
let store = lib.session().and_then(|(_, s)| {
|
||||
dr_thumbs::ThumbStore::open(&library::thumbs_dir(&s.server, &s.user_id))
|
||||
.ok()
|
||||
});
|
||||
identity_ui::refresh_coverage(w, &catalog, store.as_ref());
|
||||
w.set_identity_model_missing(
|
||||
lib.session()
|
||||
.and_then(|(_, s)| library::face_models(&s.server, &s.user_id))
|
||||
.is_none(),
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
window.set_total(entries.borrow().len() as i32);
|
||||
|
||||
Reference in New Issue
Block a user