Skip to content

Commit

Permalink
Remove ambiguious impl From<((f64, f64), (f64, f64))> for Rect
Browse files Browse the repository at this point in the history
closes #29
  • Loading branch information
cmyr committed Jun 21, 2019
1 parent 4e6f341 commit 52e7b32
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/rect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,6 @@ impl Rect {
}
}

impl From<((f64, f64), (f64, f64))> for Rect {
fn from(coords: ((f64, f64), (f64, f64))) -> Rect {
let ((x0, y0), (x1, y1)) = coords;
Rect { x0, y0, x1, y1 }
}
}

impl From<Rect> for ((f64, f64), (f64, f64)) {
fn from(r: Rect) -> ((f64, f64), (f64, f64)) {
((r.x0, r.y0), (r.x1, r.y1))
}
}

impl From<(Point, Point)> for Rect {
fn from(points: (Point, Point)) -> Rect {
Rect::from_points(points.0, points.1)
Expand Down

0 comments on commit 52e7b32

Please sign in to comment.