Skip to content

Commit 7dc0c95

Browse files
authored
Fix new clippy lints (#249)
1 parent ab5d70d commit 7dc0c95

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

src/conversion/from_geo_types.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::{LineStringType, PointType, PolygonType};
66
use std::convert::From;
77

88
#[cfg_attr(docsrs, doc(cfg(feature = "geo-types")))]
9-
impl<'a, T> From<&'a geo_types::Point<T>> for geometry::Value
9+
impl<T> From<&geo_types::Point<T>> for geometry::Value
1010
where
1111
T: CoordFloat,
1212
{
@@ -18,7 +18,7 @@ where
1818
}
1919

2020
#[cfg_attr(docsrs, doc(cfg(feature = "geo-types")))]
21-
impl<'a, T> From<&'a geo_types::MultiPoint<T>> for geometry::Value
21+
impl<T> From<&geo_types::MultiPoint<T>> for geometry::Value
2222
where
2323
T: CoordFloat,
2424
{
@@ -34,7 +34,7 @@ where
3434
}
3535

3636
#[cfg_attr(docsrs, doc(cfg(feature = "geo-types")))]
37-
impl<'a, T> From<&'a geo_types::LineString<T>> for geometry::Value
37+
impl<T> From<&geo_types::LineString<T>> for geometry::Value
3838
where
3939
T: CoordFloat,
4040
{
@@ -46,7 +46,7 @@ where
4646
}
4747

4848
#[cfg_attr(docsrs, doc(cfg(feature = "geo-types")))]
49-
impl<'a, T> From<&'a geo_types::Line<T>> for geometry::Value
49+
impl<T> From<&geo_types::Line<T>> for geometry::Value
5050
where
5151
T: CoordFloat,
5252
{
@@ -58,7 +58,7 @@ where
5858
}
5959

6060
#[cfg_attr(docsrs, doc(cfg(feature = "geo-types")))]
61-
impl<'a, T> From<&'a geo_types::Triangle<T>> for geometry::Value
61+
impl<T> From<&geo_types::Triangle<T>> for geometry::Value
6262
where
6363
T: CoordFloat,
6464
{
@@ -70,7 +70,7 @@ where
7070
}
7171

7272
#[cfg_attr(docsrs, doc(cfg(feature = "geo-types")))]
73-
impl<'a, T> From<&'a geo_types::Rect<T>> for geometry::Value
73+
impl<T> From<&geo_types::Rect<T>> for geometry::Value
7474
where
7575
T: CoordFloat,
7676
{
@@ -82,7 +82,7 @@ where
8282
}
8383

8484
#[cfg_attr(docsrs, doc(cfg(feature = "geo-types")))]
85-
impl<'a, T> From<&'a geo_types::MultiLineString<T>> for geometry::Value
85+
impl<T> From<&geo_types::MultiLineString<T>> for geometry::Value
8686
where
8787
T: CoordFloat,
8888
{
@@ -94,7 +94,7 @@ where
9494
}
9595

9696
#[cfg_attr(docsrs, doc(cfg(feature = "geo-types")))]
97-
impl<'a, T> From<&'a geo_types::Polygon<T>> for geometry::Value
97+
impl<T> From<&geo_types::Polygon<T>> for geometry::Value
9898
where
9999
T: CoordFloat,
100100
{
@@ -106,7 +106,7 @@ where
106106
}
107107

108108
#[cfg_attr(docsrs, doc(cfg(feature = "geo-types")))]
109-
impl<'a, T> From<&'a geo_types::MultiPolygon<T>> for geometry::Value
109+
impl<T> From<&geo_types::MultiPolygon<T>> for geometry::Value
110110
where
111111
T: CoordFloat,
112112
{
@@ -118,7 +118,7 @@ where
118118
}
119119

120120
#[cfg_attr(docsrs, doc(cfg(feature = "geo-types")))]
121-
impl<'a, T> From<&'a geo_types::GeometryCollection<T>> for geometry::Value
121+
impl<T> From<&geo_types::GeometryCollection<T>> for geometry::Value
122122
where
123123
T: CoordFloat,
124124
{
@@ -134,7 +134,7 @@ where
134134
}
135135

136136
#[cfg_attr(docsrs, doc(cfg(feature = "geo-types")))]
137-
impl<'a, T> From<&'a geo_types::GeometryCollection<T>> for FeatureCollection
137+
impl<T> From<&geo_types::GeometryCollection<T>> for FeatureCollection
138138
where
139139
T: CoordFloat,
140140
{

src/feature_iterator.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ enum State {
4848
AfterFeatures,
4949
}
5050

51-
impl<'de, R, D> FeatureIterator<'de, R, D> {
51+
impl<R, D> FeatureIterator<'_, R, D> {
5252
pub fn new(reader: R) -> Self {
5353
FeatureIterator {
5454
reader,
@@ -59,7 +59,7 @@ impl<'de, R, D> FeatureIterator<'de, R, D> {
5959
}
6060
}
6161

62-
impl<'de, R, D> FeatureIterator<'de, R, D>
62+
impl<R, D> FeatureIterator<'_, R, D>
6363
where
6464
R: io::Read,
6565
{

src/geojson.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ impl GeoJson {
237237
/// Convenience wrapper for [serde_json::to_string_pretty()]
238238
pub fn to_string_pretty(self) -> Result<String> {
239239
::serde_json::to_string_pretty(&self)
240-
.map_err(|err| Error::MalformedJson(err))
241-
.and_then(|s| Ok(s.to_string()))
240+
.map_err(Error::MalformedJson)
241+
.map(|s| s.to_string())
242242
}
243243
}
244244

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@
333333
//!
334334
//! ### Caveats
335335
//! - Round-tripping with intermediate processing using the `geo` types may not produce identical output,
336-
//! as e.g. outer `Polygon` rings are automatically closed.
336+
//! as e.g. outer `Polygon` rings are automatically closed.
337337
//! - `geojson` attempts to output valid geometries. In particular, it may re-orient `Polygon` rings when serialising.
338338
//!
339339
//! The [`geojson_example`](https://github.com/urschrei/geojson_example) and

src/ser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ where
344344
}
345345
}
346346

347-
impl<'a, T> serde::Serialize for Features<'a, T>
347+
impl<T> serde::Serialize for Features<'_, T>
348348
where
349349
T: Serialize,
350350
{

0 commit comments

Comments
 (0)