Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebarron committed Dec 16, 2024
1 parent b6b5ed0 commit 83a4d84
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion js/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/geoarrow/src/algorithm/geo/euclidean_distance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ iter_geo_impl!(MultiPolygonArray, PointArray);
// └─────────────────────────────────┘

// Note: this implementation is outside the macro because it is not generic over O
impl<'a> EuclideanDistance<Point> for PointArray {
impl EuclideanDistance<Point> for PointArray {
/// Minimum distance between two Points
fn euclidean_distance(&self, other: &Point) -> Float64Array {
let mut output_array = Float64Builder::with_capacity(self.len());
Expand Down
2 changes: 1 addition & 1 deletion rust/geoarrow/src/algorithm/geo/within.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ iter_geo_impl!(MultiPolygonArray, MultiPolygonArray);
// └──────────────────────────────────────────┘

// Note: this implementation is outside the macro because it is not generic over O
impl<'a> Within<Point> for PointArray {
impl Within<Point> for PointArray {
fn is_within(&self, rhs: &Point) -> BooleanArray {
let mut output_array = BooleanBuilder::with_capacity(self.len());

Expand Down
4 changes: 2 additions & 2 deletions rust/geoarrow/src/scalar/coord/interleaved.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl CoordTrait for InterleavedCoord {
}

fn x(&self) -> Self::T {
*self.coords.get(0).unwrap()
*self.coords.first().unwrap()
}

fn y(&self) -> Self::T {
Expand All @@ -118,7 +118,7 @@ impl CoordTrait for &InterleavedCoord {
}

fn x(&self) -> Self::T {
*self.coords.get(0).unwrap()
*self.coords.first().unwrap()
}

fn y(&self) -> Self::T {
Expand Down
2 changes: 1 addition & 1 deletion rust/geoarrow/src/scalar/geometrycollection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl GeometryCollectionTrait for GeometryCollection {
}
}

impl<'a> GeometryCollectionTrait for &'a GeometryCollection {
impl GeometryCollectionTrait for &GeometryCollection {
type T = f64;
type GeometryType<'b>
= Geometry
Expand Down
4 changes: 2 additions & 2 deletions rust/geoarrow/src/scalar/linestring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl NativeScalar for LineString {
}
}

impl<'a> LineStringTrait for LineString {
impl LineStringTrait for LineString {
type T = f64;
type CoordType<'b>
= Coord
Expand All @@ -72,7 +72,7 @@ impl<'a> LineStringTrait for LineString {
}
}

impl<'a> LineStringTrait for &'a LineString {
impl LineStringTrait for &LineString {
type T = f64;
type CoordType<'b>
= Coord
Expand Down
4 changes: 2 additions & 2 deletions rust/geoarrow/src/scalar/multilinestring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl NativeScalar for MultiLineString {
}
}

impl<'a> MultiLineStringTrait for MultiLineString {
impl MultiLineStringTrait for MultiLineString {
type T = f64;
type LineStringType<'b>
= LineString
Expand All @@ -76,7 +76,7 @@ impl<'a> MultiLineStringTrait for MultiLineString {
}
}

impl<'a> MultiLineStringTrait for &'a MultiLineString {
impl MultiLineStringTrait for &MultiLineString {
type T = f64;
type LineStringType<'b>
= LineString
Expand Down
4 changes: 2 additions & 2 deletions rust/geoarrow/src/scalar/multipoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl NativeScalar for MultiPoint {
}
}

impl<'a> MultiPointTrait for MultiPoint {
impl MultiPointTrait for MultiPoint {
type T = f64;
type PointType<'b>
= Point
Expand All @@ -71,7 +71,7 @@ impl<'a> MultiPointTrait for MultiPoint {
}
}

impl<'a> MultiPointTrait for &'a MultiPoint {
impl MultiPointTrait for &MultiPoint {
type T = f64;
type PointType<'b>
= Point
Expand Down
4 changes: 2 additions & 2 deletions rust/geoarrow/src/scalar/multipolygon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl NativeScalar for MultiPolygon {
}
}

impl<'a> MultiPolygonTrait for MultiPolygon {
impl MultiPolygonTrait for MultiPolygon {
type T = f64;
type PolygonType<'b>
= Polygon
Expand Down Expand Up @@ -77,7 +77,7 @@ impl<'a> MultiPolygonTrait for MultiPolygon {
}
}

impl<'a> MultiPolygonTrait for &'a MultiPolygon {
impl MultiPolygonTrait for &MultiPolygon {
type T = f64;
type PolygonType<'b>
= Polygon
Expand Down
8 changes: 4 additions & 4 deletions rust/geoarrow/src/scalar/point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::algorithm::native::bounding_rect::bounding_rect_point;
use crate::algorithm::native::eq::point_eq;
use crate::array::PointArray;
use crate::scalar::Coord;
use crate::trait_::{ArrayAccessor, NativeScalar};
use crate::trait_::NativeScalar;
use crate::{ArrayBase, NativeArray};
use geo_traits::to_geo::ToGeoPoint;
use geo_traits::PointTrait;
Expand Down Expand Up @@ -55,7 +55,7 @@ impl PointTrait for Point {
}

fn coord(&self) -> Option<Self::CoordType<'_>> {
let coord = self.0.value(0);
let coord = self.0.coords.value(0);
if coord.is_nan() {
None
} else {
Expand All @@ -64,7 +64,7 @@ impl PointTrait for Point {
}
}

impl<'a> PointTrait for &Point {
impl PointTrait for &Point {
type T = f64;
type CoordType<'b>
= Coord
Expand All @@ -76,7 +76,7 @@ impl<'a> PointTrait for &Point {
}

fn coord(&self) -> Option<Self::CoordType<'_>> {
let coord = self.0.value(0);
let coord = self.0.coords.value(0);
if coord.is_nan() {
None
} else {
Expand Down
4 changes: 2 additions & 2 deletions rust/geoarrow/src/scalar/polygon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl NativeScalar for Polygon {
}
}

impl<'a> PolygonTrait for Polygon {
impl PolygonTrait for Polygon {
type T = f64;
type RingType<'b>
= LineString
Expand Down Expand Up @@ -107,7 +107,7 @@ impl<'a> PolygonTrait for Polygon {
}
}

impl<'a> PolygonTrait for &'a Polygon {
impl PolygonTrait for &Polygon {
type T = f64;
type RingType<'b>
= LineString
Expand Down
2 changes: 1 addition & 1 deletion rust/geoarrow/src/scalar/rect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl NativeScalar for Rect {
}

// TODO: support 3d rects
impl<'a> RectTrait for Rect {
impl RectTrait for Rect {
type T = f64;
type CoordType<'b>
= SeparatedCoord
Expand Down

0 comments on commit 83a4d84

Please sign in to comment.