From d6e69188578d95d6bb75cd00cec62e375e62ba6b Mon Sep 17 00:00:00 2001 From: blyxyas Date: Thu, 23 May 2024 18:45:03 +0200 Subject: [PATCH] Make clamp inline --- library/core/src/cmp.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs index fc6022ab753..f3f757ce69d 100644 --- a/library/core/src/cmp.rs +++ b/library/core/src/cmp.rs @@ -898,6 +898,7 @@ pub trait Ord: Eq + PartialOrd { /// 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