fn str_from_utf8(line: usize, s: &[u8], field: &'static str) -> Result<String, ParserError> {
    std::str::from_utf8(s)
        .map(String::from)
        .map_err(|_| ParserError::InvalidFieldEncoding(line, field))
}
// Line parser helper for converting a byte slice to a string
Line parser helper for converting a byte slice to a string
Line parser helper for converting a byte slice to a string
fn str_from_utf8(line: usize, s: &[u8], field: &'static str) -> Result<String, ParserError> {
    std::str::from_utf8(s)
        .map(String::from)
        .map_err(|_| ParserError::InvalidFieldEncoding(line, field))
}
fn str_from_utf8 ( line : usize , s : & [ u8 ] , field : & ' static str ) -> Result < String , ParserError > { std :: str :: from_utf8 ( s ) . map ( String :: from ) . map_err ( | _ | ParserError :: InvalidFieldEncoding ( line , field ) ) }
Line parser helper for converting a byte slice to a string
Line parser helper for converting a byte slice to a string
line
usize
s
&[u8]
field
&'static str
line
usize
s
&[u8]
field
&'static str