Skip to content

Commit

Permalink
Merge georust#346
Browse files Browse the repository at this point in the history
346: Bump dependencies: rstar, proj, approx r=frewsxcv a=frewsxcv



Co-authored-by: Corey Farwell <coreyf@rwell.org>
  • Loading branch information
bors[bot] and frewsxcv committed Feb 17, 2019
2 parents fc4a6ee + 5bfcc15 commit 2cb1a5b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion geo-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ edition = "2018"
[dependencies]
num-traits = "0.2"
serde = { version = "1", optional = true, features = ["derive"] }
rstar = { version = "0.1", optional = true }
rstar = { version = "0.2", optional = true }
8 changes: 4 additions & 4 deletions geo-types/src/point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,11 @@ where

const DIMENSIONS: usize = 2;

fn generate<F>(f: F) -> Self
where
F: Fn(usize) -> Self::Scalar,
fn generate(
generator: impl Fn(usize) -> Self::Scalar
) -> Self
{
Point::new(f(0), f(1))
Point::new(generator(0), generator(1))
}

fn nth(&self, index: usize) -> Self::Scalar {
Expand Down
2 changes: 1 addition & 1 deletion geo-types/src/polygon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ where
where F: FnMut(&mut [LineString<T>])
{
f(&mut self.interiors);
for mut interior in &mut self.interiors {
for interior in &mut self.interiors {
interior.close();
}
}
Expand Down
6 changes: 3 additions & 3 deletions geo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ travis-ci = { repository = "georust/geo" }
[dependencies]
num-traits = "0.2"
serde = { version = "1.0", optional = true, features = ["derive"] }
rstar = { version = "0.1" }
rstar = { version = "0.2" }
failure = "0.1.2"
postgis = { version = "0.6", optional = true }
proj = { version = "0.5", optional = true }
proj = { version = "0.7", optional = true }
geo-types = { path = "../geo-types", features = ["rstar"] }

[features]
Expand All @@ -30,7 +30,7 @@ use-proj = ["proj"]
use-serde = ["serde", "geo-types/serde"]

[dev-dependencies]
approx = "0.1.1"
approx = "0.3.0"
criterion = { version = "0.2" }

[[bench]]
Expand Down
4 changes: 2 additions & 2 deletions geo/src/algorithm/euclidean_distance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,8 @@ pub fn nearest_neighbour_distance<T>(geom1: &LineString<T>, geom2: &LineString<T
where
T: Float + RTreeNum,
{
let tree_a: RTree<Line<_>> = RTree::bulk_load(&mut geom1.lines().collect::<Vec<_>>());
let tree_b: RTree<Line<_>> = RTree::bulk_load(&mut geom2.lines().collect::<Vec<_>>());
let tree_a: RTree<Line<_>> = RTree::bulk_load(geom1.lines().collect::<Vec<_>>());
let tree_b: RTree<Line<_>> = RTree::bulk_load(geom2.lines().collect::<Vec<_>>());
// Return minimum distance between all geom a points and all geom b points
geom2
.points_iter()
Expand Down
2 changes: 1 addition & 1 deletion geo/src/algorithm/simplifyvw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ where
let mut rings = vec![];
// Populate R* tree with exterior and interior samples, if any
let mut tree: RTree<Line<_>> = RTree::bulk_load(
&mut exterior
exterior
.lines()
.chain(
interiors
Expand Down

0 comments on commit 2cb1a5b

Please sign in to comment.