Rollup merge of #130481 - krtab:clamp_partial_ord, r=cuviper

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 76dbe29104.

Reported-by: `@noeensarguet`
This commit is contained in:
Matthias Krüger 2024-09-18 00:12:19 +02:00 committed by GitHub
commit 0a35418d34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -901,7 +901,6 @@ fn min(self, other: Self) -> Self
fn clamp(self, min: Self, max: Self) -> Self fn clamp(self, min: Self, max: Self) -> Self
where where
Self: Sized, Self: Sized,
Self: PartialOrd,
{ {
assert!(min <= max); assert!(min <= max);
if self < min { if self < min {