rational_extensions

Extends num_rational::Ratio<T>.
git clone https://git.philomathiclife.com/repos/rational_extensions
Log | Files | Refs | README

commit bacdc6d91f87c90e9fcac905d273a7436696d7f0
parent 51f993c3f2153baa8a8b9ecd2a7240862822adaf
Author: Zack Newman <zack@philomathiclife.com>
Date:   Mon, 13 Mar 2023 18:46:29 -0600

corrected documentation for MinMax

Diffstat:
Msrc/lib.rs | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib.rs b/src/lib.rs @@ -66,7 +66,7 @@ impl<T> MinMax<T> where T: PartialOrd<T>, { - /// Returns `None` iff `min` `>` `max`. + /// Returns `None` iff `min` `<=` `max` is `false`. pub fn new(min: T, max: T) -> Option<Self> { (min <= max).then_some(Self { min, max }) } @@ -74,7 +74,7 @@ where /// # Safety /// - /// `max` `>=` `min`. + /// `min` `<=` `max`. #[allow(unsafe_code)] pub const unsafe fn new_unchecked(min: T, max: T) -> Self { Self { min, max }