Skip to content

Commit

Permalink
Minor: Fix deprecation warning in benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
vipera committed Oct 3, 2022
1 parent db0d3fa commit 18cc497
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions benches/geo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ lazy_static! {
}

fn cheap_ruler_distance(from: &Point<f64>, to: &Point<f64>) -> f64 {
let ruler = CheapRuler::new(from.lat(), DistanceUnit::Meters);
let ruler = CheapRuler::new(from.y(), DistanceUnit::Meters);
ruler.distance(from, to)
}

Expand Down Expand Up @@ -53,7 +53,7 @@ fn benchmark_distance(c: &mut Criterion) {
}

fn cheap_ruler_bearing(from: &Point<f64>, to: &Point<f64>) -> f64 {
let ruler = CheapRuler::new(from.lat(), DistanceUnit::Meters);
let ruler = CheapRuler::new(from.y(), DistanceUnit::Meters);
ruler.bearing(from, to)
}

Expand Down Expand Up @@ -82,7 +82,7 @@ fn cheap_ruler_destination(
dist: f64,
from: &Point<f64>,
) -> Point<f64> {
let ruler = CheapRuler::new(from.lat(), DistanceUnit::Meters);
let ruler = CheapRuler::new(from.y(), DistanceUnit::Meters);
ruler.destination(from, dist, bearing)
}

Expand Down

0 comments on commit 18cc497

Please sign in to comment.