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:
@@ -40,7 +40,10 @@ fn the_groups_are_derivable_from_the_chain() {
|
||||
present.sort();
|
||||
present.dedup();
|
||||
|
||||
assert!(present.contains(&Attribute::Tone), "the chain has tonal work");
|
||||
assert!(
|
||||
present.contains(&Attribute::Tone),
|
||||
"the chain has tonal work"
|
||||
);
|
||||
assert!(present.contains(&Attribute::Colour));
|
||||
assert!(
|
||||
present.contains(&Attribute::Geometry),
|
||||
|
||||
@@ -55,7 +55,14 @@ fn a_region_mask_survives_a_round_trip() {
|
||||
assert_eq!(layer.id, "m1");
|
||||
assert_eq!(layer.name, "Subject");
|
||||
assert_eq!(layer.source, regions(&[3, 7, 12]));
|
||||
assert_eq!(layer.ops.iter().find(|o| o.descriptor().id.0 == "exposure").map(|o| o.param(ParamId("exposure"))), Some(0.75));
|
||||
assert_eq!(
|
||||
layer
|
||||
.ops
|
||||
.iter()
|
||||
.find(|o| o.descriptor().id.0 == "exposure")
|
||||
.map(|o| o.param(ParamId("exposure"))),
|
||||
Some(0.75)
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -120,7 +127,10 @@ fn flags_and_opacity_survive() {
|
||||
let layer = &restored.masks().layers()[0];
|
||||
assert!(layer.invert);
|
||||
assert!((layer.opacity - 0.35).abs() < 1e-6);
|
||||
assert!(!layer.enabled, "a disabled layer must stay disabled, not vanish");
|
||||
assert!(
|
||||
!layer.enabled,
|
||||
"a disabled layer must stay disabled, not vanish"
|
||||
);
|
||||
}
|
||||
|
||||
/// A selection's identity is the *set*. Two files naming the same regions in
|
||||
@@ -272,7 +282,10 @@ fn unknown_top_level_keys_still_round_trip_alongside_masks() {
|
||||
exposure.exposure = 1\n";
|
||||
|
||||
let out = Sidecar::parse(text).expect("parse").to_text();
|
||||
assert!(out.contains("future.thing"), "unknown keys are still preserved");
|
||||
assert!(
|
||||
out.contains("future.thing"),
|
||||
"unknown keys are still preserved"
|
||||
);
|
||||
assert!(out.contains("[mask default m1]"));
|
||||
}
|
||||
|
||||
@@ -361,7 +374,13 @@ fn a_brush_layer_writes_one_line_per_stroke() {
|
||||
.lines()
|
||||
.filter(|l| l.starts_with("stroke = "))
|
||||
.collect();
|
||||
assert_eq!(lines, ["stroke = add 0.05 0.5 1 0.2,0.5 0.8,0.5", "stroke = erase 0.05 0.5 1 0.5,0.5"]);
|
||||
assert_eq!(
|
||||
lines,
|
||||
[
|
||||
"stroke = add 0.05 0.5 1 0.2,0.5 0.8,0.5",
|
||||
"stroke = erase 0.05 0.5 1 0.5,0.5"
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -12,7 +12,8 @@ use dr_pipeline::{EditGraph, Sidecar};
|
||||
|
||||
/// A version block carrying `params`, in the on-disk spelling.
|
||||
fn sidecar_with(params: &[(&str, f32)]) -> String {
|
||||
let mut text = String::from("drsc 1\n\n[version u1]\nname = Default\nrevision = 2\nmodified = 0\n");
|
||||
let mut text =
|
||||
String::from("drsc 1\n\n[version u1]\nname = Default\nrevision = 2\nmodified = 0\n");
|
||||
for (key, value) in params {
|
||||
text.push_str(&format!("{key} = {value}\n"));
|
||||
}
|
||||
@@ -199,4 +200,3 @@ fn every_point_of_every_curve_round_trips_through_a_sidecar() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user