File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -173,9 +173,9 @@ pub mod nll_dashboard {
173
173
}
174
174
175
175
impl Point {
176
- pub fn pct ( & self ) -> Option < u64 > {
176
+ pub fn pct ( & self ) -> Option < f32 > {
177
177
if let ( Some ( clean) , Some ( nll) ) = ( self . clean , self . nll ) {
178
- Some ( ( 100.0 * nll / clean) as u64 )
178
+ Some ( 100.0 * nll / clean)
179
179
} else {
180
180
None
181
181
}
Original file line number Diff line number Diff line change @@ -125,8 +125,9 @@ pub fn handle_nll_dashboard(
125
125
} ) . collect :: < Vec < _ > > ( ) ;
126
126
points. sort_by ( |a, b| {
127
127
match ( a. pct ( ) , b. pct ( ) ) {
128
- ( Some ( a) , Some ( b) ) => a. cmp ( & b) . reverse ( ) ,
128
+ ( Some ( a) , Some ( b) ) => a. partial_cmp ( & b) . unwrap_or ( Ordering :: Equal ) . reverse ( ) ,
129
129
( Some ( _) , None ) => Ordering :: Less ,
130
+ ( None , Some ( _) ) => Ordering :: Greater ,
130
131
_ => a. case . cmp ( & b. case ) ,
131
132
}
132
133
} ) ;
You can’t perform that action at this time.
0 commit comments