/// Parses a string to a vec of 7 days, monday first
/// For each position true when day is active, false otherwise
Parses a string to a vec of 7 days, monday first
For each position true when day is active, false otherwise
Parses a string to a vec of 7 days monday first For each position true when day is active false otherwise
fn parse_days(s: &str) -> Option<Vec<bool>> {
    match s.to_string().as_bytes() {
        [mon, tue, wed, fri, thu, sat, sun] => {
            Some(vec![
                *mon == ('M' as u8),
                *tue == ('T' as u8),
                *wed == ('W' as u8),
                *fri == ('T' as u8),
                *thu == ('F' as u8),
                *sat == ('S' as u8),
                *sun == ('S' as u8)
            ])
        },
        _ => None
    }
}
fn parse_days ( s : & str ) -> Option < Vec < bool > > { match s . to_string ( ) . as_bytes ( ) { [ mon , tue , wed , fri , thu , sat , sun ] => { Some ( vec ! [ mon ( 'M' as u8 ) tue ( 'T' as u8 ) wed ( 'W' as u8 ) fri ( 'T' as u8 ) thu ( 'F' as u8 ) sat ( 'S' as u8 ) sun ( 'S' as u8 ) ] ) } , _ => None } }
Parses a string to a vec of 7 days, monday first
For each position true when day is active, false otherwise
Parses a string to a vec of 7 days monday first For each position true when day is active false otherwise
s
&str