style(filters): doc comment markers and clippy idioms in the filter slice (M5)

This commit is contained in:
Tanish Manku committed 2026-11-16 19:29:44 -07:00
1 parent 8055fb026f
commit 5fd3298517
3 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -663,7 +663,7 @@ fn text_with_filters_draws_in_a_filtered_group() {
let dl = evaluate(&d, 0);
assert_eq!(dl.groups.len(), 1, "one group for the text");
let g = &dl.groups[0];
assert_eq!(&*g.filters, &[shadow.filter.clone()], "only the filter that is on");
assert_eq!(&*g.filters, std::slice::from_ref(&shadow.filter), "only the filter that is on");
assert_eq!(g.alpha, 0.5, "the text's alpha fades the group, after the filters");
assert!(!dl.items.is_empty() && dl.items.iter().all(|i| i.group == Some(0)), "every item of the text is in it");
assert!(dl.items.iter().all(|i| i.color.mul[3] == 1.0), "and none fades on its own");
+2 -2
View File
@@ -402,7 +402,7 @@ impl Filter {
}
}
//// A colour of a filter a motion tween can animate (ADR 0099), channel by channel.
/// A colour of a filter a motion tween can animate (ADR 0099), channel by channel.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub enum FilterColor {
/// The colour of a Drop Shadow or a Glow.
@@ -861,7 +861,7 @@ pub fn pairs_up(a: &[FilterEntry], b: &[FilterEntry]) -> bool {
a.len() == b.len() && a.iter().zip(b).all(|(x, y)| std::mem::discriminant(&x.filter) == std::mem::discriminant(&y.filter))
}
//// The classic tween between two filter lists (ADR 0081, 0091, 0099). Every filter's numbers
/// The classic tween between two filter lists (ADR 0081, 0091, 0099). Every filter's numbers
/// and colours travel to its partner's; quality, the switches (Inner, Knockout, Hide object,
/// the Type) and whether the filter is on stay the first keyframe's, and ramps travel stop by
/// stop when they have as many stops.
+1 -1
View File
@@ -739,7 +739,7 @@ fn colour_row(app: &mut App, ui: &mut egui::Ui, painter: &egui::Painter, row: Re
let four = channels(slot, c);
let open = app.me_open.contains(&(slot, c));
let any_track = four.iter().any(|p| m.track(*p).is_some());
painter.rect_filled(row, 0.0, if r % 2 == 0 { T.panel } else { T.panel_alt });
painter.rect_filled(row, 0.0, if r.is_multiple_of(2) { T.panel } else { T.panel_alt });
// The mark: pointing right when closed, down when its channels show.
let tip = pos2(row.left() + 16.0, row.center().y);
let tri = if open { vec![tip + vec2(-4.0, -2.5), tip + vec2(4.0, -2.5), tip + vec2(0.0, 3.5)] } else { vec![tip + vec2(-2.5, -4.0), tip + vec2(3.5, 0.0), tip + vec2(-2.5, 4.0)] };