@@ -55,7 +55,7 @@ impl<T: Float> AsMut<T> for OrderedFloat<T> {
5555 }
5656}
5757
58- impl < T : Float + PartialOrd > Ord for OrderedFloat < T > {
58+ impl < T : Float > Ord for OrderedFloat < T > {
5959 fn cmp ( & self , other : & OrderedFloat < T > ) -> Ordering {
6060 match self . partial_cmp ( & other) {
6161 Some ( ordering) => ordering,
@@ -77,7 +77,7 @@ impl<T: Float + PartialOrd> Ord for OrderedFloat<T> {
7777impl < T : Float + PartialEq > PartialEq for OrderedFloat < T > {
7878 fn eq ( & self , other : & OrderedFloat < T > ) -> bool {
7979 if self . as_ref ( ) . is_nan ( ) {
80- if other. as_ref ( ) . is_nan ( ) { true } else { false }
80+ other. as_ref ( ) . is_nan ( )
8181 } else if other. as_ref ( ) . is_nan ( ) {
8282 false
8383 } else {
@@ -176,7 +176,7 @@ impl<T: Float> AsRef<T> for NotNaN<T> {
176176 }
177177}
178178
179- impl < T : Float + PartialOrd > Ord for NotNaN < T > {
179+ impl < T : Float > Ord for NotNaN < T > {
180180 fn cmp ( & self , other : & NotNaN < T > ) -> Ordering {
181181 match self . partial_cmp ( & other) {
182182 Some ( ord) => ord,
@@ -522,7 +522,7 @@ pub struct FloatIsNaN;
522522
523523impl Error for FloatIsNaN {
524524 fn description ( & self ) -> & str {
525- return "NotNaN constructed with NaN" ;
525+ "NotNaN constructed with NaN"
526526 }
527527}
528528
0 commit comments