|
|
@ -13,7 +13,7 @@ pub struct Rect<T> { |
|
|
|
#[allow(dead_code)]
|
|
|
|
impl<T> Rect<T>
|
|
|
|
where T: Copy + Add<Output=T> + Sub<Output=T> + Mul<Output=T>
|
|
|
|
+ Ord + PartialOrd
|
|
|
|
+ PartialOrd
|
|
|
|
{
|
|
|
|
/// Returns a new rectangle given the upper-left corner and its width + height.
|
|
|
|
pub fn new(x: T, y: T, w: T, h: T) -> Rect<T> {
|
|
|
|