no more warnings

This commit is contained in:
Quentin 2023-07-23 18:33:20 +02:00
parent 755a095743
commit 80c0f6b5b9
Signed by: quentin
GPG key ID: E9602264D639FF68
6 changed files with 6 additions and 9 deletions

View file

@ -20,6 +20,7 @@ pub enum Content<'a> {
ID(MessageID<'a>),
Description(Unstructured<'a>),
}
#[allow(dead_code)]
impl<'a> Content<'a> {
pub fn ctype(&'a self) -> Option<&'a NaiveType<'a>> {
match self {

View file

@ -1,5 +1,5 @@
use nom::{
bytes::complete::{is_not, tag},
bytes::complete::{tag},
combinator::{map, opt},
multi::many0,
sequence::{preceded, terminated, tuple},
@ -9,7 +9,6 @@ use nom::{
use crate::mime::charset::EmailCharset;
use crate::text::misc_token::{mime_word, MIMEWord};
use crate::text::words::mime_atom;
use crate::text::ascii;
// --------- NAIVE TYPE
#[derive(Debug, PartialEq)]

View file

@ -62,6 +62,7 @@ pub enum MixedField<'a> {
MIME(mime::field::Content<'a>),
IMF(imf::field::Field<'a>),
}
#[allow(dead_code)]
impl<'a> MixedField<'a> {
pub fn mime(&self) -> Option<&mime::field::Content<'a>> {
match self {

View file

@ -1,3 +1,5 @@
#![allow(dead_code)]
// ASCII
// -- CONTROL CHARACTERS
pub const NULL: u8 = 0x00; // NULL

View file

@ -25,13 +25,6 @@ pub fn obs_crlf(input: &[u8]) -> IResult<&[u8], &[u8]> {
alt((tag(ascii::CRLF), tag(&[ascii::CR]), tag(&[ascii::LF])))(input)
}
pub fn line(input: &[u8]) -> IResult<&[u8], (&[u8], &[u8])> {
// is_not(CRLF) is a hack, it means "is not CR or LF"
// and not "is not CRLF". In other words, it continues while
// it does not encounter 0x0D or 0x0A.
pair(is_not(ascii::CRLF), obs_crlf)(input)
}
/// ```abnf
/// fold_line = any *(1*(crlf WS) any) crlf
/// ```

View file

@ -90,6 +90,7 @@ pub fn dot_atom_text(input: &[u8]) -> IResult<&[u8], &[u8]> {
/// dot-atom
///
/// `[CFWS] dot-atom-text [CFWS]`
#[allow(dead_code)]
pub fn dot_atom(input: &[u8]) -> IResult<&[u8], &[u8]> {
delimited(opt(cfws), dot_atom_text, opt(cfws))(input)
}