pub(crate) fn parse_first_line(b: &[u8]) -> IResult<&[u8], InitialResponseLine<'_>> {
    let res = all_consuming(tuple((
        take_response_code,
        nom::character::complete::char(' '),
        take_until("\r\n"),
        crlf,
    )))(b)?;

    let (rest, (code, _, data, _crlf)) = res;
    let code = code
        .try_into()
        .expect("Code should be three bytes, there is likely a bug in the parser.");

    Ok((
        rest,
        InitialResponseLine {
            code,
            data,
            buffer: b,
        },
    ))
}
/// Parse an first line of an NNTP response
///
/// Per [RFC 3977](https://tools.ietf.org/html/rfc3977#section-3.2), the first line of an
/// NNTP response consists of a three-digit response code, a single space, and then
/// some text terminated with a CRLF.
Parse an first line of an NNTP response
Per [RFC 3977], the first line of an
NNTP response consists of a three-digit response code, a single space, and then
some text terminated with a CRLF.
Parse an first line of an NNTP response Per [ RFC 3977 ] the first line of an NNTP response consists of a three - digit response code a single space and then some text terminated with a CRLF .
pub(crate) fn parse_first_line(b: &[u8]) -> IResult<&[u8], InitialResponseLine<'_>> {
    let res = all_consuming(tuple((
        take_response_code,
        nom::character::complete::char(' '),
        take_until("\r\n"),
        crlf,
    )))(b)?;
    let (rest, (code, _, data, _crlf)) = res;
    let code = code
        .try_into()
        .expect("Code should be three bytes, there is likely a bug in the parser.");
    Ok((
        rest,
        InitialResponseLine {
            code,
            data,
            buffer: b,
        },
    ))
}
pub ( crate ) fn parse_first_line ( b : & [ u8 ] ) -> IResult < & [ u8 ] , InitialResponseLine < ' _ > > { let res = all_consuming ( tuple ( ( take_response_code , nom :: character :: complete :: char ( ' ' ) , take_until ( " \r \n " ) , crlf , ) ) ) ( b ) ? ; let ( rest , ( code , _ , data , _crlf ) ) = res ; let code = code . try_into ( ) . expect ( " " ) ; Ok ( ( rest , InitialResponseLine { code , data , buffer : b , } , ) ) }
Parse an first line of an NNTP response
Per [RFC 3977](https://tools.ietf.org/html/rfc3977#section-3.2), the first line of an
NNTP response consists of a three-digit response code, a single space, and then
some text terminated with a CRLF.
Parse an first line of an NNTP response Per [ RFC 3977 ] ( https : // tools . ietf . org / html / rfc3977#section - 3 . 2 ) the first line of an NNTP response consists of a three - digit response code a single space and then some text terminated with a CRLF .
b
&[u8]