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 1ead476 commit 9fa3abc
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 @@ -874,7 +874,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 9fa3abc

Please sign in to comment.