From c293344a869b270e2b28ff7e928c9acf528f433a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20H=C3=BCgel?= Date: Wed, 31 Jul 2024 13:35:04 +0100 Subject: [PATCH] Fix doc indents to appease clippy --- geo-types/src/geometry/multi_polygon.rs | 3 +-- geo-types/src/geometry/polygon.rs | 22 ++++++++++---------- geo/src/algorithm/is_convex.rs | 26 ++++++++++++------------ geo/src/algorithm/monotone/sweep.rs | 4 ++-- geo/src/algorithm/simplify_vw.rs | 6 +++--- geo/src/algorithm/sweep/line_or_point.rs | 4 ++-- geo/src/algorithm/triangulate_spade.rs | 2 +- 7 files changed, 33 insertions(+), 34 deletions(-) diff --git a/geo-types/src/geometry/multi_polygon.rs b/geo-types/src/geometry/multi_polygon.rs index 86f68768d..8a0b7d200 100644 --- a/geo-types/src/geometry/multi_polygon.rs +++ b/geo-types/src/geometry/multi_polygon.rs @@ -20,8 +20,7 @@ use core::iter::FromIterator; /// /// - The interiors of no two constituent polygons may intersect. /// -/// - The boundaries of two (distinct) constituent polygons -/// may only intersect at finitely many points. +/// - The boundaries of two (distinct) constituent polygons may only intersect at finitely many points. /// /// Refer to section 6.1.14 of the OGC-SFA for a formal /// definition of validity. Note that the validity is not diff --git a/geo-types/src/geometry/polygon.rs b/geo-types/src/geometry/polygon.rs index d1c8f5a6f..053a0ffa2 100644 --- a/geo-types/src/geometry/polygon.rs +++ b/geo-types/src/geometry/polygon.rs @@ -28,23 +28,23 @@ use approx::{AbsDiffEq, RelativeEq}; /// # Validity /// /// - The exterior and interior rings must be valid -/// `LinearRing`s (see [`LineString`]). +/// `LinearRing`s (see [`LineString`]). /// /// - No two rings in the boundary may cross, and may -/// intersect at a `Point` only as a tangent. In other -/// words, the rings must be distinct, and for every pair of -/// common points in two of the rings, there must be a -/// neighborhood (a topological open set) around one that -/// does not contain the other point. +/// intersect at a `Point` only as a tangent. In other +/// words, the rings must be distinct, and for every pair of +/// common points in two of the rings, there must be a +/// neighborhood (a topological open set) around one that +/// does not contain the other point. /// /// - The closure of the interior of the `Polygon` must -/// equal the `Polygon` itself. For instance, the exterior -/// may not contain a spike. +/// equal the `Polygon` itself. For instance, the exterior +/// may not contain a spike. /// /// - The interior of the polygon must be a connected -/// point-set. That is, any two distinct points in the -/// interior must admit a curve between these two that lies -/// in the interior. +/// point-set. That is, any two distinct points in the +/// interior must admit a curve between these two that lies +/// in the interior. /// /// Refer to section 6.1.11.1 of the OGC-SFA for a formal /// definition of validity. Besides the closed `LineString` diff --git a/geo/src/algorithm/is_convex.rs b/geo/src/algorithm/is_convex.rs index ebcb05605..66cdb56a6 100644 --- a/geo/src/algorithm/is_convex.rs +++ b/geo/src/algorithm/is_convex.rs @@ -11,29 +11,29 @@ use crate::{Coord, GeoNum, LineString}; /// # Remarks /// /// - Collinearity does not require that the `LineString` -/// be closed, but the rest of the predicates do. +/// be closed, but the rest of the predicates do. /// /// - This definition is closely related to the notion -/// of [convexity of polygons][convex set]. In particular, a -/// [`Polygon`](crate::Polygon) is convex, if and only if its `exterior` is -/// convex, and `interiors` is empty. +/// of [convexity of polygons][convex set]. In particular, a +/// [`Polygon`](crate::Polygon) is convex, if and only if its `exterior` is +/// convex, and `interiors` is empty. /// /// - The [`ConvexHull`] algorithm always returns a strictly -/// convex `LineString` unless the input is empty or -/// collinear. The [`graham_hull`] algorithm provides an -/// option to include collinear points, producing a -/// (possibly non-strict) convex `LineString`. +/// convex `LineString` unless the input is empty or +/// collinear. The [`graham_hull`] algorithm provides an +/// option to include collinear points, producing a +/// (possibly non-strict) convex `LineString`. /// /// # Edge Cases /// /// - the convexity, and collinearity of an empty -/// `LineString` is _unspecified_ and must not be relied -/// upon. +/// `LineString` is _unspecified_ and must not be relied +/// upon. /// /// - A closed `LineString` with at most three coordinates -/// (including the possibly repeated first coordinate) is -/// both convex and collinear. However, the strict convexity -/// is _unspecified_ and must not be relied upon. +/// (including the possibly repeated first coordinate) is +/// both convex and collinear. However, the strict convexity +/// is _unspecified_ and must not be relied upon. /// /// [convex combination]: //en.wikipedia.org/wiki/Convex_combination /// [convex set]: //en.wikipedia.org/wiki/Convex_set diff --git a/geo/src/algorithm/monotone/sweep.rs b/geo/src/algorithm/monotone/sweep.rs index 40b4f0b8c..a0bbc81a4 100644 --- a/geo/src/algorithm/monotone/sweep.rs +++ b/geo/src/algorithm/monotone/sweep.rs @@ -15,8 +15,8 @@ use super::{RcSegment, Segment}; /// - iterate over all end-points of the input line or points in lex. order /// /// - query the set of active segments at the current iteration point: these are -/// the segments currently intersecting the sweep line, and are ordered by their -/// position on the line +/// the segments currently intersecting the sweep line, and are ordered by their +/// position on the line /// /// # Note /// diff --git a/geo/src/algorithm/simplify_vw.rs b/geo/src/algorithm/simplify_vw.rs index ec5ed9627..7f426637c 100644 --- a/geo/src/algorithm/simplify_vw.rs +++ b/geo/src/algorithm/simplify_vw.rs @@ -548,9 +548,9 @@ pub trait SimplifyVwPreserve { /// - It is possible for the simplification algorithm to displace a Polygon's interior ring outside its shell. /// - The algorithm does **not** guarantee a valid output geometry, especially on smaller geometries. /// - If removal of a point causes a self-intersection, but the geometry only has `n + 1` - /// points remaining (3 for a `LineString`, 5 for a `Polygon`), the point is retained and the - /// simplification process ends. This is because there is no guarantee that removal of two points will remove - /// the intersection, but removal of further points would leave too few points to form a valid geometry. + /// points remaining (3 for a `LineString`, 5 for a `Polygon`), the point is retained and the + /// simplification process ends. This is because there is no guarantee that removal of two points will remove + /// the intersection, but removal of further points would leave too few points to form a valid geometry. /// - The tolerance used to remove a point is `epsilon`, in keeping with GEOS. JTS uses `epsilon ^ 2` /// /// # Examples diff --git a/geo/src/algorithm/sweep/line_or_point.rs b/geo/src/algorithm/sweep/line_or_point.rs index aad4dbf27..c733a9836 100644 --- a/geo/src/algorithm/sweep/line_or_point.rs +++ b/geo/src/algorithm/sweep/line_or_point.rs @@ -146,10 +146,10 @@ impl PartialEq for LineOrPoint { /// Requires the following conditions: /// /// 1. If comparing two lines, both the left ends must be strictly -/// smaller than both right ends. +/// smaller than both right ends. /// /// 2. A point is treated as a infinitesimal small vertical segment -/// centered at its coordinates. +/// centered at its coordinates. impl PartialOrd for LineOrPoint { fn partial_cmp(&self, other: &Self) -> Option { match (self, other) { diff --git a/geo/src/algorithm/triangulate_spade.rs b/geo/src/algorithm/triangulate_spade.rs index 96094a900..e4cd9de38 100644 --- a/geo/src/algorithm/triangulate_spade.rs +++ b/geo/src/algorithm/triangulate_spade.rs @@ -460,7 +460,7 @@ fn remove_lines_by_index( /// split lines based on intersection kind: /// /// - intersection point: create 4 new lines from the existing line's endpoints to the intersection -/// point +/// point /// - collinear: create 3 new lines (before overlap, overlap, after overlap) fn split_lines( [l0, l1]: [Line; 2],