Skip to content

Commit

Permalink
Remove uneeded PartialOrd bound in cmp::Ord::clamp
Browse files Browse the repository at this point in the history
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
krtab committed Sep 17, 2024
1 parent 8a5922f commit 46a0aa8
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 46a0aa8

Please sign in to comment.