Skip to content

Commit

Permalink
Remove redundant test and fix doc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tkallady committed Sep 18, 2024
1 parent 3785074 commit 610e71e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 1 addition & 2 deletions src/drawing/fill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ where
filled_image
}

#[doc=generate_mut_doc_comment!("draw_line_segment")]
#[doc=generate_mut_doc_comment!("flood_fill")]
pub fn flood_fill_mut<P>(image: &mut Image<P>, x: u32, y: u32, fill_with: P)
where
P: Pixel + PartialEq,
Expand Down Expand Up @@ -68,6 +68,5 @@ where
let x = x as u32;
let y = y as u32;
let (width, height) = image.dimensions();
//TODO: Compare pixel equality without conversion to rgba
x < width && y < height && *image.get_pixel(x, y) == target_pixel
}
3 changes: 0 additions & 3 deletions tests/regression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -762,9 +762,6 @@ fn test_draw_flood_filled_shape() {
draw_hollow_ellipse_mut(&mut image, (100, 150), 80, 30, green);
draw_hollow_ellipse_mut(&mut image, (150, 150), 100, 60, blue);

let filled_image = flood_fill(&image, 120, 120, red);
compare_to_truth_image(&filled_image, "flood_filled_shape.png");

flood_fill_mut(&mut image, 120, 120, red);
compare_to_truth_image(&image, "flood_filled_shape.png");
}
Expand Down

0 comments on commit 610e71e

Please sign in to comment.