Reflow what rustfmt wanted in the raw histogram
The author could not run cargo, so this is the formatter's first pass over the new module and its presentation half. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -595,7 +595,11 @@ mod tests {
|
||||
// the axis were inverted the histogram would still look like a
|
||||
// histogram, and every headroom judgement made from it would be
|
||||
// exactly backwards.
|
||||
assert_eq!(RawHistogram::stops(BINS - 1), 0.0, "the top bin is saturation");
|
||||
assert_eq!(
|
||||
RawHistogram::stops(BINS - 1),
|
||||
0.0,
|
||||
"the top bin is saturation"
|
||||
);
|
||||
assert_eq!(RawHistogram::stops(BINS - 1 - BINS_PER_STOP), 1.0);
|
||||
assert_eq!(RawHistogram::stops(BINS - 1 - 8 * BINS_PER_STOP), 8.0);
|
||||
// The floor is one bin short of `STOPS`, because bin 0 is the end of
|
||||
@@ -704,7 +708,11 @@ mod tests {
|
||||
);
|
||||
// Neutral, so the brightest channel must land on the same bin as
|
||||
// the three do.
|
||||
assert_eq!(hist.brightest()[bin], h, "the envelope drifted at bin {bin}");
|
||||
assert_eq!(
|
||||
hist.brightest()[bin],
|
||||
h,
|
||||
"the envelope drifted at bin {bin}"
|
||||
);
|
||||
}
|
||||
// Nothing below the ramp, so an off-by-one that spilled a pixel past
|
||||
// the end of it would show here rather than hiding in a bin the loop
|
||||
@@ -742,7 +750,11 @@ mod tests {
|
||||
let hist = pass.compute(&source(&ctx, &rgb, 4, 1)).expect("compute");
|
||||
|
||||
assert_eq!(hist.pixels(), 4);
|
||||
assert_eq!(hist.saturated(), 2, "two pixels have a channel at the ceiling");
|
||||
assert_eq!(
|
||||
hist.saturated(),
|
||||
2,
|
||||
"two pixels have a channel at the ceiling"
|
||||
);
|
||||
assert_eq!(hist.at_black(), 0);
|
||||
assert_eq!(hist.red()[BINS - 1], 2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user