diff --git a/crates/doc/src/eval_tests.rs b/crates/doc/src/eval_tests.rs index 3b054252..edd722dc 100644 --- a/crates/doc/src/eval_tests.rs +++ b/crates/doc/src/eval_tests.rs @@ -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"); diff --git a/crates/doc/src/filter.rs b/crates/doc/src/filter.rs index def46d2a..16885b9b 100644 --- a/crates/doc/src/filter.rs +++ b/crates/doc/src/filter.rs @@ -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. diff --git a/src/motion_editor.rs b/src/motion_editor.rs index be87b56e..69b5d0c6 100644 --- a/src/motion_editor.rs +++ b/src/motion_editor.rs @@ -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)] };