unsafe fn split_ymd_hms_with_frac_as_s(
    mut s: &[u8],
    frac: &[u8],
) -> Result<(i32, u32, u32, u32, u32, u32)> {
    let year: i32;
    if s.len() == 14 {
        year = box_try!(from_bytes(&s[..4]).parse());
        s = &s[4..];
    } else {
        year = box_try!(from_bytes(&s[..2]).parse());
        s = &s[2..];
    };
    let month: u32 = box_try!(from_bytes(&s[..2]).parse());
    let day: u32 = box_try!(from_bytes(&s[2..4]).parse());
    let hour: u32 = box_try!(from_bytes(&s[4..6]).parse());
    let minute: u32 = if s.len() == 7 {
        box_try!(from_bytes(&s[6..7]).parse())
    } else {
        box_try!(from_bytes(&s[6..8]).parse())
    };
    let secs: u32 = if s.len() > 8 {
        let i = if s.len() > 9 { 10 } else { 9 };
        box_try!(from_bytes(&s[8..i]).parse())
    } else {
        match frac.len() {
            0 => 0,
            1 => box_try!(from_bytes(&frac[..1]).parse()),
            _ => box_try!(from_bytes(&frac[..2]).parse()),
        }
    };
    Ok((year, month, day, hour, minute, secs))
}
// Safety: caller must ensure each byte of `s` and `frac` is a valid unicode
// character (i.e., `s` and `frac` may be sliced at any index and should give
// a valid unicode string).
caller must ensure each byte of `s` and `frac` is a valid unicode
character .
caller must ensure each byte of ` s ` and ` frac ` is a valid unicode character .
unsafe fn split_ymd_hms_with_frac_as_s(
    mut s: &[u8],
    frac: &[u8],
) -> Result<(i32, u32, u32, u32, u32, u32)> {
    let year: i32;
    if s.len() == 14 {
        year = box_try!(from_bytes(&s[..4]).parse());
        s = &s[4..];
    } else {
        year = box_try!(from_bytes(&s[..2]).parse());
        s = &s[2..];
    };
    let month: u32 = box_try!(from_bytes(&s[..2]).parse());
    let day: u32 = box_try!(from_bytes(&s[2..4]).parse());
    let hour: u32 = box_try!(from_bytes(&s[4..6]).parse());
    let minute: u32 = if s.len() == 7 {
        box_try!(from_bytes(&s[6..7]).parse())
    } else {
        box_try!(from_bytes(&s[6..8]).parse())
    };
    let secs: u32 = if s.len() > 8 {
        let i = if s.len() > 9 { 10 } else { 9 };
        box_try!(from_bytes(&s[8..i]).parse())
    } else {
        match frac.len() {
            0 => 0,
            1 => box_try!(from_bytes(&frac[..1]).parse()),
            _ => box_try!(from_bytes(&frac[..2]).parse()),
        }
    };
    Ok((year, month, day, hour, minute, secs))
}
unsafe fn split_ymd_hms_with_frac_as_s ( mut s : & [ u8 ] , frac : & [ u8 ] , ) -> Result < ( i32 , u32 , u32 , u32 , u32 , u32 ) > { let year : i32 ; if s . len ( ) == 14 { year = box_try ! ( from_bytes ( s [ 4 ] ) parse ( ) ) ; s = & s [ 4 .. ] ; } else { year = box_try ! ( from_bytes ( s [ 2 ] ) parse ( ) ) ; s = & s [ 2 .. ] ; } ; let month : u32 = box_try ! ( from_bytes ( s [ 2 ] ) parse ( ) ) ; let day : u32 = box_try ! ( from_bytes ( s [ 2 4 ] ) parse ( ) ) ; let hour : u32 = box_try ! ( from_bytes ( s [ 4 6 ] ) parse ( ) ) ; let minute : u32 = if s . len ( ) == 7 { box_try ! ( from_bytes ( s [ 6 7 ] ) parse ( ) ) } else { box_try ! ( from_bytes ( s [ 6 8 ] ) parse ( ) ) } ; let secs : u32 = if s . len ( ) > 8 { let i = if s . len ( ) > 9 { 10 } else { 9 } ; box_try ! ( from_bytes ( s [ 8 i ] ) parse ( ) ) } else { match frac . len ( ) { 0 => 0 , 1 => box_try ! ( from_bytes ( frac [ 1 ] ) parse ( ) ) , _ => box_try ! ( from_bytes ( frac [ 2 ] ) parse ( ) ) , } } ; Ok ( ( year , month , day , hour , minute , secs ) ) }
Safety: caller must ensure each byte of `s` and `frac` is a valid unicode
character (i.e., `s` and `frac` may be sliced at any index and should give
a valid unicode string).
Safety : caller must ensure each byte of ` s ` and ` frac ` is a valid unicode character ( i . e . ` s ` and ` frac ` may be sliced at any index and should give a valid unicode string ) .
s
&[u8]
frac
&[u8]
s
&[u8]
frac
&[u8]