Skip to main content

pick_best

Function pick_best 

Source
pub fn pick_best(scores: Vec<GoldenMatch>) -> (GoldenMatch, Vec<GoldenMatch>)
Expand description

Pick the best golden out of a non-empty list of scored matches.

Sorts all_golden_scores descending by overall. Returns (matched, sorted) where matched is a clone of the top entry.

§Panics

Panics if scores is empty — callers must guarantee at least one golden.