How to find to order a vector of tuples based on the last value (which is a f64
) of the tuple, with rust? I have a big vector with tuples, so I'm looking for an efficient way to order this vector.
pub fn main() {
let mut results = vec![
("a".to_string(), 50, 5.0),
("b".to_string(), 70, 4.0),
("c".to_string(), 40, 10.0)
];
}