Clean some code, add README
This commit is contained in:
@@ -17,10 +17,7 @@ impl FromStr for Format {
|
||||
fn from_str(s: &str) -> Result<Self> {
|
||||
match s.trim().to_lowercase().as_str() {
|
||||
"json" => Ok(Format::Json),
|
||||
"text" => Ok(Format::PlainText),
|
||||
"plain" => Ok(Format::PlainText),
|
||||
"plain_text" => Ok(Format::PlainText),
|
||||
"plaintext" => Ok(Format::PlainText),
|
||||
"text" | "plain" | "plain_text" | "plaintext" => Ok(Format::PlainText),
|
||||
_ => Err(anyhow!("Unrecognized format {}", s)),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -364,7 +364,6 @@ fn parse_field_header(input: &[u8]) -> IResult<&[u8], FieldHeader> {
|
||||
todo!()
|
||||
}
|
||||
let (input, size) = le_u16(input)?;
|
||||
// let (input, data) = take(size)(input)?;
|
||||
Ok((input, FieldHeader { field_type, size }))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user