Skip to content

Commit

Permalink
Remove 0x0 rect example, since those apparently aren't allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsteele committed Apr 16, 2017
1 parent 9a60a95 commit 57d848b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/sdl2/rect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,9 @@ impl Rect {
///
/// Points along the right and bottom edges are not considered to be inside
/// the rectangle; this way, a 1-by-1 rectangle contains only a single
/// point, and a 0-by-0 rectangle contains no points at all. Another way
/// to look at it is that this method returns true if and only if the given
/// point would be painted by a call to [`Renderer::fill_rect`](
/// point. Another way to look at it is that this method returns true if
/// and only if the given point would be painted by a call to
/// [`Renderer::fill_rect`](
/// ../render/struct.Renderer.html#method.fill_rect).
///
/// # Examples
Expand All @@ -317,8 +317,6 @@ impl Rect {
/// assert!(!rect.contains(Point::new(0, 1)));
/// assert!(rect.contains(Point::new(3, 5)));
/// assert!(!rect.contains(Point::new(4, 6)));
/// let rect = Rect::new(1, 2, 0, 0);
/// assert!(!rect.contains(Point::new(1, 2)));
/// ```
pub fn contains<P>(&self, point: P) -> bool where P: Into<(i32, i32)> {
let (x, y) = point.into();
Expand Down

0 comments on commit 57d848b

Please sign in to comment.