Format the tree the way the gate asks for it

`cargo fmt --check` is a required step and had drifted across 45 files. Most of
it arrived this week: several operations were written in parallel worktrees and
merged by hand, and a hand-merge resolves conflicts without ever running the
formatter over the result.

No behaviour changes — this is `cargo fmt --all` and nothing else, kept as its
own commit so the next reader can skip it wholesale rather than search it for
one that matters.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-22 21:16:34 +02:00
co-authored by Claude Opus 5
parent d04087af83
commit c75849040c
45 changed files with 545 additions and 257 deletions
+7 -9
View File
@@ -46,7 +46,11 @@ fn main() {
};
println!(
"tiling {}",
if tiled { "grid, 25% overlap" } else { "whole frame" }
if tiled {
"grid, 25% overlap"
} else {
"whole frame"
}
);
let t0 = std::time::Instant::now();
@@ -57,10 +61,7 @@ fn main() {
let instances = model
.detect(&rgb, width, height, &options)
.expect("inference");
println!(
"detect {:.0} ms",
t1.elapsed().as_secs_f32() * 1000.0
);
println!("detect {:.0} ms", t1.elapsed().as_secs_f32() * 1000.0);
println!("found {} instances", instances.len());
for (i, inst) in instances.iter().enumerate() {
@@ -131,10 +132,7 @@ fn load_jpeg(path: &str) -> (Vec<f32>, usize, usize) {
// where *not* linearising is the correct thing to do.
let rgb = match pixels.len() / (w * h) {
3 => pixels.iter().map(|&v| v as f32 / 255.0).collect(),
1 => pixels
.iter()
.flat_map(|&v| [v as f32 / 255.0; 3])
.collect(),
1 => pixels.iter().flat_map(|&v| [v as f32 / 255.0; 3]).collect(),
n => panic!("unexpected {n} components per pixel"),
};