From 0c9a17689ad8d72610bedcb17dac42ac6822d171 Mon Sep 17 00:00:00 2001 From: Arthur Carcano Date: Tue, 17 Sep 2024 20:03:59 +0200 Subject: [PATCH] Remove uneeded PartialOrd bound in cmp::Ord::clamp There is a Self: PartialOrd bound in Ord::clamp, but it is already required by the trait itself. Likely a left-over from the const trait deletion in 76dbe2910465072f85e74d6f7115ec9e6803e8bf. Reported-by: @noeensarguet --- library/core/src/cmp.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs index a1ed993b7d9bf..818a36002e759 100644 --- a/library/core/src/cmp.rs +++ b/library/core/src/cmp.rs @@ -901,7 +901,6 @@ pub trait Ord: Eq + PartialOrd { fn clamp(self, min: Self, max: Self) -> Self where Self: Sized, - Self: PartialOrd, { assert!(min <= max); if self < min {