Update lib.rs

Make assert debug error more accurate.
This commit is contained in:
Jacob Kiesel 2017-02-07 15:03:00 -07:00 committed by GitHub
parent f8dcec366b
commit 17665ec50d
1 changed files with 1 additions and 1 deletions

View File

@ -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 {