Skip to content

Commit d6e6918

Browse files
committed
Make clamp inline
1 parent bec1029 commit d6e6918

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/core/src/cmp.rs

+1
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,7 @@ pub trait Ord: Eq + PartialOrd<Self> {
898898
/// assert_eq!(2.clamp(-2, 1), 1);
899899
/// ```
900900
#[must_use]
901+
#[inline]
901902
#[stable(feature = "clamp", since = "1.50.0")]
902903
fn clamp(self, min: Self, max: Self) -> Self
903904
where

0 commit comments

Comments
 (0)