Skip to content

Commit

Permalink
Make clamp inline
Browse files Browse the repository at this point in the history
  • Loading branch information
blyxyas committed May 23, 2024
1 parent bec1029 commit d6e6918
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/core/src/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,7 @@ pub trait Ord: Eq + PartialOrd<Self> {
/// assert_eq!(2.clamp(-2, 1), 1);
/// ```
#[must_use]
#[inline]
#[stable(feature = "clamp", since = "1.50.0")]
fn clamp(self, min: Self, max: Self) -> Self
where
Expand Down

0 comments on commit d6e6918

Please sign in to comment.