From 17665ec50d55fdc1570fcecea4b2b25cb832c49a Mon Sep 17 00:00:00 2001 From: Jacob Kiesel Date: Tue, 7 Feb 2017 15:03:00 -0700 Subject: [PATCH] Update lib.rs Make assert debug error more accurate. --- traits/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/traits/src/lib.rs b/traits/src/lib.rs index 49904c4..23063fe 100644 --- a/traits/src/lib.rs +++ b/traits/src/lib.rs @@ -247,7 +247,7 @@ float_trait_impl!(Num for f32 f64); /// returned. Otherwise input is returned. #[inline] pub fn clamp(input: T, min: T, max: T) -> T { - debug_assert!(min <= max, "min must be less than max"); + debug_assert!(min <= max, "min must be less than or equal to max"); if input < min { min } else if input > max {