Format the face work with the workspace's own rustfmt
Not authored in this session. `cargo fmt --all` reformats every crate, so running it while working on `dr-segment` picked up five files from the recent face and library work that had been committed unformatted. Committed on its own rather than swept into the change that happened to produce it: the diff is pure whitespace, and mixed into a commit that alters an algorithm it would be noise in exactly the place someone is trying to read carefully. `cargo fmt --all -- --check` is a CI gate (tools/ci-local.sh), so this had to land somewhere regardless. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+11
-16
@@ -3027,7 +3027,6 @@ fn faces_unindexed(
|
||||
Ok(rows)
|
||||
}
|
||||
|
||||
|
||||
/// Images whose faces have nothing left to be cut out of.
|
||||
///
|
||||
/// A face is stored normalised and drawn by cropping the proxy it was found on
|
||||
@@ -3334,13 +3333,7 @@ pub fn spawn_face_sweep(
|
||||
}
|
||||
};
|
||||
|
||||
match index_one_native(
|
||||
&gpu,
|
||||
&mut detector,
|
||||
&mut embedder,
|
||||
&bytes,
|
||||
&options,
|
||||
) {
|
||||
match index_one_native(&gpu, &mut detector, &mut embedder, &bytes, &options) {
|
||||
Ok((faces, edge, proxy)) => {
|
||||
// Before the detections, so a kill between the two
|
||||
// leaves a proxy with no faces recorded -- which
|
||||
@@ -3376,9 +3369,7 @@ pub fn spawn_face_sweep(
|
||||
// or the user pressed Stop. Everything
|
||||
// written so far stays written -- and
|
||||
// everything borrowed is given back.
|
||||
log::info!(
|
||||
"face sweep: cancelled after {images} image(s)"
|
||||
);
|
||||
log::info!("face sweep: cancelled after {images} image(s)");
|
||||
pool.release_all(&*backend).await;
|
||||
return;
|
||||
}
|
||||
@@ -3447,10 +3438,7 @@ pub fn spawn_face_sweep(
|
||||
/// because measuring what this pass is worth means rendering the same file two
|
||||
/// ways and comparing the crops — see `examples/face_native.rs`. A tool that
|
||||
/// had to reimplement the render would be measuring its own reimplementation.
|
||||
pub fn render_native(
|
||||
gpu: &dr_gpu::GpuContext,
|
||||
bytes: &[u8],
|
||||
) -> Result<dr_export::Frame, String> {
|
||||
pub fn render_native(gpu: &dr_gpu::GpuContext, bytes: &[u8]) -> Result<dr_export::Frame, String> {
|
||||
open_native(gpu, bytes)?.render_for_export(dr_types::ColourSpace::Srgb)
|
||||
}
|
||||
|
||||
@@ -3503,7 +3491,14 @@ fn index_one_native(
|
||||
embedder: &mut dr_face::Embedder,
|
||||
bytes: &[u8],
|
||||
options: &dr_face::DetectOptions,
|
||||
) -> Result<(Vec<dr_catalog::faces::DetectedFace>, u32, Option<dr_thumbs::Thumbnail>), String> {
|
||||
) -> Result<
|
||||
(
|
||||
Vec<dr_catalog::faces::DetectedFace>,
|
||||
u32,
|
||||
Option<dr_thumbs::Thumbnail>,
|
||||
),
|
||||
String,
|
||||
> {
|
||||
let mut session = open_native(gpu, bytes)?;
|
||||
let frame = session.render_for_export(dr_types::ColourSpace::Srgb)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user