Skip to content

Commit

Permalink
Merge pull request #116 from michaelkirk/mkirk/cleanup-warnings
Browse files Browse the repository at this point in the history
Address some compiler warnings
  • Loading branch information
frewsxcv authored May 29, 2017
2 parents 88026a5 + 5d7e57e commit f627e93
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/algorithm/extremes.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use num_traits::{Float, Signed};
use types::{Point, LineString, Polygon, MultiPoint, MultiPolygon};
use types::{Point, Polygon, MultiPoint, MultiPolygon};
use algorithm::convexhull::ConvexHull;
use algorithm::orient::{Orient, Direction};
use types::{Extremes, ExtremePoint};

// Useful direction vectors, aligned with x and y axes:
Expand All @@ -11,6 +10,9 @@ use types::{Extremes, ExtremePoint};
// -1, 0. = smallest x

// various tests for vector orientation relative to a direction vector u

// Not currently used, but maybe useful in the future
#[allow(dead_code)]
fn up<T>(u: &Point<T>, v: &Point<T>) -> bool
where T: Float
{
Expand All @@ -31,6 +33,8 @@ fn above<T>(u: &Point<T>, vi: &Point<T>, vj: &Point<T>) -> bool
}

// true if Vi is below Vj
// Not currently used, but maybe useful in the future
#[allow(dead_code)]
fn below<T>(u: &Point<T>, vi: &Point<T>, vj: &Point<T>) -> bool
where T: Float
{
Expand Down Expand Up @@ -215,7 +219,8 @@ impl<T, G> ExtremePoints<T> for G

#[cfg(test)]
mod test {
use types::Point;

use types::{Point, LineString};
use super::*;
#[test]
fn test_polygon_extreme_x() {
Expand Down Expand Up @@ -282,7 +287,7 @@ mod test {
#[test]
fn test_polygon_extreme_wrapper_convex() {
// convex, with a bump on the top-right edge
let mut points_raw =
let points_raw =
vec![(1.0, 0.0), (2.0, 1.0), (1.75, 1.75), (1.0, 2.0), (0.0, 1.0), (1.0, 0.0)];
let points = points_raw
.iter()
Expand Down

0 comments on commit f627e93

Please sign in to comment.