pub fn sort_by_score(mut nodes: Vec<NodeId>, scores: &[RankScore]) -> Vec<NodeId> {
    use std::cmp::Ordering::*;
    nodes.sort_by(|x, y| match scores[*y].partial_cmp(&scores[*x]).unwrap() {
        Less => Less,
        Greater => Greater,
        Equal => x.partial_cmp(y).unwrap(),
    });
    nodes
}
/// Sort nodes by "highest score" first. Nodes with equal score are sorted by node ID (lowest ID
/// first).
Sort nodes by "highest score" first. Nodes with equal score are sorted by node ID (lowest ID
first).
Sort nodes by " highest score " first . Nodes with equal score are sorted by node ID ( lowest ID first ) .
pub fn sort_by_score(mut nodes: Vec<NodeId>, scores: &[RankScore]) -> Vec<NodeId> {
    use std::cmp::Ordering::*;
    nodes.sort_by(|x, y| match scores[*y].partial_cmp(&scores[*x]).unwrap() {
        Less => Less,
        Greater => Greater,
        Equal => x.partial_cmp(y).unwrap(),
    });
    nodes
}
pub fn sort_by_score ( mut nodes : Vec < NodeId > , scores : & [ RankScore ] ) -> Vec < NodeId > { use std :: cmp :: Ordering :: * ; nodes . sort_by ( | x , y | match scores [ * y ] . partial_cmp ( & scores [ * x ] ) . unwrap ( ) { Less => Less , Greater => Greater , Equal => x . partial_cmp ( y ) . unwrap ( ) , } ) ; nodes }
Sort nodes by "highest score" first.
Sort nodes by " highest score " first .
nodes
Vec<NodeId>
scores
&[RankScore]
nodes
Vec<NodeId>
scores
&[RankScore]