[doc] clippy
This commit is contained in:
@@ -60,10 +60,10 @@ fn wand_and_delete_take_a_stroke_with_its_soft_edge() {
|
||||
let mut r = Raster::new(120, 60);
|
||||
let b = Brush { radius: 8.0, hardness: 0.3, color: [31, 42, 68, 255], opacity: 1.0, erase: false };
|
||||
bitmap::brush(&mut r, &[(10.0, 30.0, 1.0), (110.0, 30.0, 1.0)], &b, None);
|
||||
assert!(r.rgba.chunks_exact(4).any(|p| p[3] > 0 && p[3] < 255), "the stroke has a soft edge");
|
||||
assert!(r.rgba.as_chunks::<4>().0.iter().any(|p| p[3] > 0 && p[3] < 255), "the stroke has a soft edge");
|
||||
let m = bitmap::region(&r, 60, 30, 24);
|
||||
bitmap::clear(&mut r, Some(&m));
|
||||
assert!(r.rgba.chunks_exact(4).all(|p| p[3] == 0), "pixels of the stroke were left behind");
|
||||
assert!(r.rgba.as_chunks::<4>().0.iter().all(|p| p[3] == 0), "pixels of the stroke were left behind");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user