From fb378470e7b36be6a06cb0da8f0e82c3885810a4 Mon Sep 17 00:00:00 2001 From: ManeraKai Date: Tue, 30 Apr 2024 12:38:33 +0300 Subject: [PATCH] Ran cargo fmt --- src/context_handle.rs | 5 +---- src/from_geo.rs | 8 ++------ src/geometry.rs | 8 ++------ 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/context_handle.rs b/src/context_handle.rs index 4db79f5..27bbe48 100644 --- a/src/context_handle.rs +++ b/src/context_handle.rs @@ -15,10 +15,7 @@ macro_rules! set_callbacks { #[allow(clippy::needless_lifetimes)] fn $kind(ptr: GEOSContextHandle_t, nf: *mut InnerContext) { #[allow(clippy::extra_unused_lifetimes)] - unsafe extern "C" fn message_handler_func( - message: *const c_char, - data: *mut c_void, - ) { + unsafe extern "C" fn message_handler_func(message: *const c_char, data: *mut c_void) { let inner_context: &InnerContext = &*(data as *mut _); if let Ok(callback) = inner_context.$callback_name.lock() { diff --git a/src/from_geo.rs b/src/from_geo.rs index 6977e76..79644a7 100644 --- a/src/from_geo.rs +++ b/src/from_geo.rs @@ -1,8 +1,6 @@ use crate::error::Error; use crate::{CoordDimensions, CoordSeq, Geometry as GGeometry}; -use geo_types::{ - Coord, LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon, -}; +use geo_types::{Coord, LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon}; use std; use std::borrow::Borrow; @@ -206,9 +204,7 @@ impl TryFrom> for GGeometry { mod test { use super::LineRing; use crate::{Geom, Geometry as GGeometry}; - use geo_types::{ - Coord, LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon, - }; + use geo_types::{Coord, LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon}; use std::convert::TryInto; fn coords(tuples: Vec<(f64, f64)>) -> Vec> { diff --git a/src/geometry.rs b/src/geometry.rs index 1416dad..97d8ba0 100644 --- a/src/geometry.rs +++ b/src/geometry.rs @@ -823,11 +823,7 @@ pub trait Geom: /// assert_eq!(geom1.hausdorff_distance_densify(&geom2, 1.).map(|x| format!("{:.2}", x)) /// .unwrap(), "1.00"); /// ``` - fn hausdorff_distance_densify( - &self, - other: &G, - distance_frac: f64, - ) -> GResult; + fn hausdorff_distance_densify(&self, other: &G, distance_frac: f64) -> GResult; /// Returns the frechet distance between `self` and `other`. The unit depends of the SRID. /// /// Available using the `v3_7_0` feature. @@ -1405,7 +1401,7 @@ pub trait Geom: /// 0.0000000000000000 6.0000000000000000, \ /// 0.0000000000000000 0.0000000000000000)"); /// ``` - fn get_exterior_ring(& self) -> GResult; + fn get_exterior_ring(&self) -> GResult; } macro_rules! impl_geom {