Skip to content

Commit

Permalink
Rollup merge of rust-lang#130481 - krtab:clamp_partial_ord, r=cuviper
Browse files Browse the repository at this point in the history
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 76dbe29.

Reported-by: `@noeensarguet`
  • Loading branch information
matthiaskrgr authored Sep 17, 2024
2 parents f3a53b7 + 46a0aa8 commit e65d8e8
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion core/src/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,6 @@ pub trait Ord: Eq + PartialOrd<Self> {
fn clamp(self, min: Self, max: Self) -> Self
where
Self: Sized,
Self: PartialOrd,
{
assert!(min <= max);
if self < min {
Expand Down

0 comments on commit e65d8e8

Please sign in to comment.