Browse Source

Update lib.rs

Make assert debug error more accurate.
Jacob Kiesel 8 years ago
parent
commit
17665ec50d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      traits/src/lib.rs

+ 1 - 1
traits/src/lib.rs

@@ -247,7 +247,7 @@ float_trait_impl!(Num for f32 f64);
 /// returned.  Otherwise input is returned.
 #[inline]
 pub fn clamp<T: PartialOrd>(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 {