Skip to content

Commit

Permalink
remove superfluous tests
Browse files Browse the repository at this point in the history
These tests are just testing how rust features works, not anything in this lib.
  • Loading branch information
michaelkirk committed Apr 1, 2020
1 parent 302d17d commit fc33f9f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 86 deletions.
28 changes: 0 additions & 28 deletions geo-types/src/coordinate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,6 @@ use crate::{CoordinateType, Point};
/// as an envelope, a precision model, and spatial reference system
/// information), a `Coordinate` only contains ordinate values and accessor
/// methods.
///
/// ## Equality Examples
///
/// ```
/// use geo_types::Coordinate;
///
/// let c1 = Coordinate { x: 1.0, y: 2.0};
/// let c2 = Coordinate { x: 1.0, y: 2.0} ;
/// assert_eq!(c1, c2);
///
/// let c3 = Coordinate { x: 1.0, y: 2.1};
/// assert_ne!(c1, c3);
/// ```
///
/// ```
/// use geo_types::Coordinate;
///
/// struct AssertEq<T: Eq>(pub T);
/// let _: AssertEq<Coordinate<i32>> = AssertEq(Coordinate { x: 1, y: 2 });
/// ```
///
/// ```compile_fail
/// use geo_types::Coordinate;
///
/// struct AssertEq<T: Eq>(pub T);
/// // Eq impl is not derived for Coordinate<f32> because f32 is not Eq
/// let _: AssertEq<Coordinate<f32>> = AssertEq(Coordinate { x: 1.0, y: 2.0 });
/// ```
#[derive(Eq, PartialEq, Clone, Copy, Debug, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct Coordinate<T>
Expand Down
30 changes: 0 additions & 30 deletions geo-types/src/geometry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,6 @@ use std::fmt;
/// let pn = Point::try_from(pe).unwrap();
/// ```
///
/// ## Equality Examples
///
/// ```
/// use geo_types::{Geometry, Point};
///
/// let p1 = Point::new(1.0, 2.0);
/// let p2 = Point::new(1.0, 2.0);
/// let g1 = Geometry::Point(p1);
/// let g2 = Geometry::Point(p2);
/// assert_eq!(g1, g2);
///
/// let p3 = Point::new(1.0, 2.1);
/// let g3 = Geometry::Point(p3);
/// assert_ne!(g1, g3);
/// ```
///
/// ```
/// use geo_types::{Geometry, Point};
///
/// struct AssertEq<T: Eq>(pub T);
/// let _: AssertEq<Geometry<i32>> = AssertEq(Geometry::Point(Point::new(1, 2)));
/// ```
///
/// ```compile_fail
/// use geo_types::{Geometry, Point};
///
/// struct AssertEq<T: Eq>(pub T);
/// // Eq impl is not derived for Geometry<f32> because f32 is not Eq
/// let _: AssertEq<Geometry<f32>> = AssertEq(Geometry::Point(Point::new(1.0, 2.0)));
/// ```
#[derive(Eq, PartialEq, Clone, Debug, Hash)]
pub enum Geometry<T>
where
Expand Down
28 changes: 0 additions & 28 deletions geo-types/src/point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,6 @@ use std::ops::Sub;
/// let c = Coordinate { x: 10., y: 20. };
/// let p2: Point<f64> = c.into();
/// ```
///
/// ## Equality Examples
///
/// ```
/// use geo_types::Point;
///
/// let p1 = Point::new(1.0, 2.0);
/// let p2 = Point::new(1.0, 2.0);
/// assert_eq!(p1, p2);
///
/// let p3 = Point::new(1.0, 2.1);
/// assert_ne!(p1, p3);
/// ```
///
/// ```
/// use geo_types::Point;
///
/// struct AssertEq<T: Eq>(pub T);
/// let _: AssertEq<Point<i32>> = AssertEq(Point::new(1, 2));
/// ```
///
/// ```compile_fail
/// use geo_types::Point;
///
/// struct AssertEq<T: Eq>(pub T);
/// // Eq impl is not derived for Point<f32> because f32 is not Eq
/// let _: AssertEq<Point<f32>> = AssertEq(Point::new(1.0, 2.0));
/// ```
#[derive(Eq, PartialEq, Clone, Copy, Debug, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct Point<T>(pub Coordinate<T>)
Expand Down

0 comments on commit fc33f9f

Please sign in to comment.