pub fn min_element<T: Ord>(vec: &[T]) -> Option<&T>Expand description
Find the minimum element in the vector
ยงExample:
use r_unit::vec;
let vector = vec![1, 2, 3, 4];
if let Some(min) = vec::min_element(&vector) {
println!("The minimum element in the vector is: {}.", min);
} else {
println!("The vector is empty.");
};