Dereference pixel arrays for readonly color comparison

This commit is contained in:
2026-09-12 18:36:16 -07:00
parent f555193172
commit dd39e1fdc1
@@ -186,7 +186,7 @@ async fn mounted_readonly_input_keeps_selection_copy_and_readable_paint() {
.0 .0
.iter() .iter()
.enumerate() .enumerate()
.filter(|(_, pixel)| near(pixel, style.selection, 3)) .filter(|(_, pixel)| near(*pixel, style.selection, 3))
.map(|(index, _)| (index % 480, index / 480)) .map(|(index, _)| (index % 480, index / 480))
.collect(); .collect();
assert!( assert!(
@@ -206,7 +206,7 @@ async fn mounted_readonly_input_keeps_selection_copy_and_readable_paint() {
let (x, y) = (index % 480, index / 480); let (x, y) = (index % 480, index / 480);
(left..=right).contains(&x) (left..=right).contains(&x)
&& (top..=bottom).contains(&y) && (top..=bottom).contains(&y)
&& near(pixel, style.value, 12) && near(*pixel, style.value, 12)
}) })
.count(); .count();
assert!( assert!(