1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
use super::Intersects;
use crate::*;

impl<T> Intersects<Coordinate<T>> for Coordinate<T>
where
    T: CoordinateType,
{
    fn intersects(&self, rhs: &Coordinate<T>) -> bool {
        self == rhs
    }
}

// The other side of this is handled via a blanket impl.
impl<T> Intersects<Point<T>> for Coordinate<T>
where
    T: CoordinateType,
{
    fn intersects(&self, rhs: &Point<T>) -> bool {
        self == &rhs.0
    }
}