/// Parses a time to hours, minutes, seconds
Parses a time to hours, minutes, seconds
Parses a time to hours minutes seconds
fn parse_time(s: &str) -> Option<Time> {
    let x = s.split(":");
    let split: Vec<&str> = x.collect();
    match split.as_slice() {
        [h, m, s] => {
            Some(Time {
                hours: parse_int_with_min_max(h, 0, 23),
                minutes: parse_int_with_min_max(m, 0, 59),
                seconds: parse_int_with_min_max(s, 0, 59)
            })
        },
        _ => None
    }
}
fn parse_time ( s : & str ) -> Option < Time > { let x = s . split ( " " ) ; let split : Vec < & str > = x . collect ( ) ; match split . as_slice ( ) { [ h , m , s ] => { Some ( Time { hours : parse_int_with_min_max ( h , 0 , 23 ) , minutes : parse_int_with_min_max ( m , 0 , 59 ) , seconds : parse_int_with_min_max ( s , 0 , 59 ) } ) } , _ => None } }
Parses a time to hours, minutes, seconds
Parses a time to hours minutes seconds
s
&str