From f305467ecd0fadacc069c2727fd4a2e2b2ac022b Mon Sep 17 00:00:00 2001 From: Thierry Berger Date: Thu, 18 Jul 2024 15:43:37 +0200 Subject: [PATCH] Replace type alias with a 'use'. (#223) --- CHANGELOG.md | 3 +++ src/lib.rs | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e01125f9..d87629de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,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`. - Significantly improved the general stability of mesh/mesh intersection calculation. ## v0.16.1 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.