From 9cd8b443946f0c9f76f9b9c829927c0a190cbaf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20H=C3=BCgel?= Date: Thu, 3 Sep 2020 21:56:28 +0100 Subject: [PATCH] Only need to declare doc features in one place --- src/conversion/from_geo_types.rs | 4 ---- src/conversion/mod.rs | 4 ---- src/conversion/to_geo_types.rs | 4 ---- src/lib.rs | 3 +++ 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/conversion/from_geo_types.rs b/src/conversion/from_geo_types.rs index 146ed43c..ac0cebb6 100644 --- a/src/conversion/from_geo_types.rs +++ b/src/conversion/from_geo_types.rs @@ -1,7 +1,3 @@ -// only enables the `doc_cfg` feature when -// the `docsrs` configuration attribute is defined -#[cfg_attr(docsrs, feature(doc_cfg))] - use crate::geo_types; use crate::geometry; diff --git a/src/conversion/mod.rs b/src/conversion/mod.rs index aa05a451..d3d7bd37 100644 --- a/src/conversion/mod.rs +++ b/src/conversion/mod.rs @@ -12,10 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// only enables the `doc_cfg` feature when -// the `docsrs` configuration attribute is defined -#[cfg_attr(docsrs, feature(doc_cfg))] - use crate::geo_types; use crate::geo_types::{ Geometry as GtGeometry, GeometryCollection, LineString as GtLineString, diff --git a/src/conversion/to_geo_types.rs b/src/conversion/to_geo_types.rs index 64f7e441..b038568c 100644 --- a/src/conversion/to_geo_types.rs +++ b/src/conversion/to_geo_types.rs @@ -1,7 +1,3 @@ -// only enables the `doc_cfg` feature when -// the `docsrs` configuration attribute is defined -#[cfg_attr(docsrs, feature(doc_cfg))] - use crate::geo_types; use crate::geometry; diff --git a/src/lib.rs b/src/lib.rs index ecf88195..05c187ab 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -264,6 +264,9 @@ //! implementations which may be useful if you wish to perform this kind of processing yourself and require //! more granular control over performance and / or memory allocation. +// only enables the `doc_cfg` feature when +// the `docsrs` configuration attribute is defined +#[cfg_attr(docsrs, feature(doc_cfg))] #[cfg(feature = "geo-types")] use geo_types; use serde;