common_stdx/
lib.rs

1
2mod point;
3pub use point::Point;
4
5#[derive(Debug, Clone, Copy, PartialEq, Eq)]
6pub struct Rect<T> {
7    pub p1: Point<T>,
8    pub p2: Point<T>,
9}
10
11impl<T> Rect<T> {
12    pub fn new(p1: Point<T>, p2: Point<T>) -> Self {
13        Rect { p1, p2 }
14    }
15}
16