collect values of a hashmap into a vector
问题 I am new to Rust and can not find the way of collecting the values of a hashmap into a vector in the documentation. Let's say I have a hashmap: score_table: HashMap<Id, Score> and I want to get all the Score into a Vec all_scores: Vec<Score> I was tempted to use the values but it does not work since values is not a vec: all_scores = score_table.values() I know that Values implement the ExactSizeIterator trait, but I do not know how to collect all values of an iterator into a vector without