fn sort(&mut self) -> &mut Self
	{ //best nets (high score) in front, bad and NaN nets at the end
		self.items.sort_by(|ref r1, ref r2| { //reverse partial cmp and check for NaN
				let r = (r2.1).partial_cmp(&r1.1);
				if r.is_some() { r.unwrap() }
				else
				{
					if r1.1.is_nan() { if r2.1.is_nan() { Ordering::Equal } else { Ordering::Greater } } else { Ordering::Less }
				}
			});
		
		self
	}
/// Sorts the items, so that the best is in front (index 0)
Sorts the items, so that the best is in front (index 0)
Sorts the items so that the best is in front ( index 0 )
fn sort(&mut self) -> &mut Self
	{ //best nets (high score) in front, bad and NaN nets at the end
		self.items.sort_by(|ref r1, ref r2| { //reverse partial cmp and check for NaN
				let r = (r2.1).partial_cmp(&r1.1);
				if r.is_some() { r.unwrap() }
				else
				{
					if r1.1.is_nan() { if r2.1.is_nan() { Ordering::Equal } else { Ordering::Greater } } else { Ordering::Less }
				}
			});
		self
	}
fn sort ( & mut self ) -> & mut Self { //best nets (high score) in front, bad and NaN nets at the end self . items . sort_by ( | ref r1 , ref r2 | { //reverse partial cmp and check for NaN let r = ( r2 . 1 ) . partial_cmp ( & r1 . 1 ) ; if r . is_some ( ) { r . unwrap ( ) } else { if r1 . 1 . is_nan ( ) { if r2 . 1 . is_nan ( ) { Ordering :: Equal } else { Ordering :: Greater } } else { Ordering :: Less } } } ) ; self }
Sorts the items, so that the best is in front (index 0)
Sorts the items so that the best is in front ( index 0 )
&mut self
&mut self