fn check_crlf<'a>(bytes: &'a [u8]) -> Result<&'a [u8]> {
    if bytes.len() < 2 {
        Err(Error::Partial)
    } else if bytes.starts_with(&b"\r\n"[..]) {
        // Skip over CRLF.
        Ok(&bytes[2..])
    } else {
        Err(Error::Syntax)
    }
}
/// Check if the given slice begins with CRLF and, if it does, return the slice
/// immediately after.
Check if the given slice begins with CRLF and, if it does, return the slice
immediately after.
Check if the given slice begins with CRLF and if it does return the slice immediately after .
fn check_crlf<'a>(bytes: &'a [u8]) -> Result<&'a [u8]> {
    if bytes.len() < 2 {
        Err(Error::Partial)
    } else if bytes.starts_with(&b"\r\n"[..]) {
        // Skip over CRLF.
        Ok(&bytes[2..])
    } else {
        Err(Error::Syntax)
    }
}
fn check_crlf < ' a > ( bytes : & ' a [ u8 ] ) -> Result < & ' a [ u8 ] > { if bytes . len ( ) < 2 { Err ( Error :: Partial ) } else if bytes . starts_with ( & b" \r \n " [ .. ] ) { // Skip over CRLF. Ok ( & bytes [ 2 .. ] ) } else { Err ( Error :: Syntax ) } }
Check if the given slice begins with CRLF and, if it does, return the slice
immediately after.
Check if the given slice begins with CRLF and if it does return the slice immediately after .
bytes
&'a [u8]
bytes
&'a [u8]