Skip to content

Commit

Permalink
Rollup merge of #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 28e8f01 + 0c9a176 commit 0a35418
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion library/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 0a35418

Please sign in to comment.