Dereference pixel arrays for readonly color comparison
This commit is contained in:
@@ -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!(
|
||||||
|
|||||||
Reference in New Issue
Block a user