shortest

Function shortest 

Source
pub fn shortest<'a>(vec: &'a [&'a str]) -> &'a str
Expand description

Returns the shortest element from the given vector

ยงExample

let vec = vec!["a", "ab", "abc"];
assert_eq!(shortest(&vec), "a");