remove debugging

This commit is contained in:
Quentin 2023-07-23 18:35:13 +02:00
parent 80c0f6b5b9
commit 5da5172c27
Signed by: quentin
GPG key ID: E9602264D639FF68
3 changed files with 7 additions and 9 deletions

View file

@ -1,6 +1,6 @@
From: Art Vandelay <art@vandelay.com> (Vandelay Industries)
To: "Colleagues": "James Smythe" <james@vandelay.com>; Friends:
jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;
jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;,
Date: Sat, 20 Nov 2021 14:22:01 -0800
Subject: Why not both importing AND exporting?
Content-Type: multipart/mixed; boundary="festivus";

View file

@ -146,13 +146,11 @@ fn hex_octet(input: &[u8]) -> IResult<&[u8], u8> {
use nom::error::*;
let (rest, hbytes) = preceded(tag("="), take(2usize))(input)?;
println!("TOOK: {:?}", hbytes);
let hstr = String::from_utf8_lossy(hbytes);
let parsed = u8::from_str_radix(hstr.as_ref(), 16)
.map_err(|_| nom::Err::Error(Error::new(input, ErrorKind::Verify)))?;
println!("PARSED: {}", parsed);
Ok((rest, parsed))
}

View file

@ -51,7 +51,7 @@ pub fn mime_word(input: &[u8]) -> IResult<&[u8], MIMEWord> {
))(input)
}
#[derive(Debug, PartialEq)]
#[derive(PartialEq)]
pub enum Word<'a> {
Quoted(QuotedString<'a>),
Encoded(encoding::EncodedWord<'a>),
@ -70,11 +70,11 @@ impl<'a> ToString for Word<'a> {
}
}
}
/*impl<'a> fmt::Debug for Word<'a> {
impl<'a> fmt::Debug for Word<'a> {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt.debug_tuple("Word").field(&format_args!("\"{}\"", self.to_string())).finish()
}
}*/
}
/// Word
///
@ -89,7 +89,7 @@ pub fn word(input: &[u8]) -> IResult<&[u8], Word> {
))(input)
}
#[derive(Debug, PartialEq)]
#[derive(PartialEq)]
pub struct Phrase<'a>(pub Vec<Word<'a>>);
impl<'a> ToString for Phrase<'a> {
@ -101,11 +101,11 @@ impl<'a> ToString for Phrase<'a> {
.join(" ")
}
}
/*impl<'a> fmt::Debug for Phrase<'a> {
impl<'a> fmt::Debug for Phrase<'a> {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt.debug_tuple("Phrase").field(&format_args!("\"{}\"", self.to_string())).finish()
}
}*/
}
/// Phrase
///