Remove uneeded PartialOrd bound in cmp::Ord::clamp · qinheping/verify-rust-std@46a0aa8 (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit 46a0aa8

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

File tree

1 file changed

lines changed

1 file changed

lines changed

Lines changed: 0 additions & 1 deletion

Original file line number Diff line number Diff line change
@@ -901,7 +901,6 @@ pub trait Ord: Eq + PartialOrd {
901 901 fn clamp(self, min: Self, max: Self) -> Self
902 902 where
903 903 Self: Sized,
904 -Self: PartialOrd,
905 904 {
906 905 assert!(min <= max);
907 906 if self < min {