From 657c6ee5d0ad4afd35b3948c8104070b9ed9b661 Mon Sep 17 00:00:00 2001 From: Thierry Berger Date: Mon, 15 Jul 2024 11:32:35 +0200 Subject: [PATCH 1/2] replace type alias with a 'use'. --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 0c7da13e..38351293 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -77,11 +77,11 @@ pub mod utils; mod real { /// The scalar type used throughout this crate. #[cfg(feature = "f64")] - pub type Real = f64; + pub use f64 as Real; /// The scalar type used throughout this crate. #[cfg(feature = "f32")] - pub type Real = f32; + pub use f32 as Real; } /// Compilation flags dependent aliases for mathematical types. From 06364df7d5c64c8a6316b3534bac8ac3c3bcb07e Mon Sep 17 00:00:00 2001 From: Thierry Berger Date: Thu, 18 Jul 2024 15:40:57 +0200 Subject: [PATCH 2/2] add changelog line --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bbfb5362..4c08494a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ ### Modified - `TypedShape::Custom(u32)` is now `TypedShape::Custom(&dyn Shape)`. +- `Real` is now exposed through a `use` statement, + so that an indirection is removed in documentation: + previous occurrences of `Real` now show `f32` or `f64`. ## v0.16.1