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:
@@ -65,12 +65,7 @@ fn render_at(
|
||||
h: u32,
|
||||
) -> Vec<u8> {
|
||||
let source = grey_at(ctx, w, h);
|
||||
let shader = compose_full(
|
||||
&ops::chain(),
|
||||
&Framing::new(),
|
||||
ColourSpace::Srgb,
|
||||
stack,
|
||||
);
|
||||
let shader = compose_full(&ops::chain(), &Framing::new(), ColourSpace::Srgb, stack);
|
||||
|
||||
let mut masks = MaskPass::new(ctx).expect("mask pass");
|
||||
let array = masks.render(stack, field, None, w, h).expect("rasterise");
|
||||
@@ -245,11 +240,14 @@ fn stacked_layers_use_their_own_masks() {
|
||||
ids: vec![0],
|
||||
}));
|
||||
// Right half down.
|
||||
let mut darken = MaskLayer::new("m2", MaskSource::Regions {
|
||||
signature: 1,
|
||||
level: 2,
|
||||
ids: vec![1],
|
||||
});
|
||||
let mut darken = MaskLayer::new(
|
||||
"m2",
|
||||
MaskSource::Regions {
|
||||
signature: 1,
|
||||
level: 2,
|
||||
ids: vec![1],
|
||||
},
|
||||
);
|
||||
darken.set_param("exposure", ParamId("exposure"), -2.0);
|
||||
stack.push(darken);
|
||||
|
||||
@@ -412,12 +410,7 @@ fn a_stroke_that_doubles_back_does_not_build_up() {
|
||||
return;
|
||||
};
|
||||
|
||||
let once = stack_of(painted(&[(
|
||||
false,
|
||||
0.15,
|
||||
0.5,
|
||||
vec![(0.1, 0.5), (0.9, 0.5)],
|
||||
)]));
|
||||
let once = stack_of(painted(&[(false, 0.15, 0.5, vec![(0.1, 0.5), (0.9, 0.5)])]));
|
||||
let twice = stack_of(painted(&[(
|
||||
false,
|
||||
0.15,
|
||||
@@ -473,10 +466,17 @@ fn a_dab_is_round_on_a_frame_that_is_not_square() {
|
||||
let pixels = render_at(&ctx, &stack, None, W, H);
|
||||
|
||||
let lit = |v: u8| v > 160;
|
||||
let across = (0..W).filter(|&x| lit(luma_in(&pixels, W, x, H / 2))).count();
|
||||
let down = (0..H).filter(|&y| lit(luma_in(&pixels, W, W / 2, y))).count();
|
||||
let across = (0..W)
|
||||
.filter(|&x| lit(luma_in(&pixels, W, x, H / 2)))
|
||||
.count();
|
||||
let down = (0..H)
|
||||
.filter(|&y| lit(luma_in(&pixels, W, W / 2, y)))
|
||||
.count();
|
||||
|
||||
assert!(across > 4 && down > 4, "the dab should exist: {across}x{down}");
|
||||
assert!(
|
||||
across > 4 && down > 4,
|
||||
"the dab should exist: {across}x{down}"
|
||||
);
|
||||
assert!(
|
||||
across.abs_diff(down) <= 2,
|
||||
"a dab must be as wide as it is tall, got {across} across and {down} down"
|
||||
|
||||
Reference in New Issue
Block a user