diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-07-23 15:30:26 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-07-23 15:30:26 +0200 |
commit | 62cfbde13e1fad13278da726429b649b6921c60b (patch) | |
tree | 85b42035884ffec761c446b6f767cc4e87870038 /src | |
parent | 31cb35a0c2d87ec227188c55ba3887698e7c4822 (diff) |
Remove unused type
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/mail.rs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/mail.rs b/src/mail.rs index 6e99cc5..c818a3d 100644 --- a/src/mail.rs +++ b/src/mail.rs @@ -33,28 +33,3 @@ impl Mail { } -#[derive(Clone, Debug)] -pub struct UnparsedMail { - id: String, - buffer: Vec<u8>, -} - -impl UnparsedMail { - pub fn read_from_path(id: String, pb: PathBuf) -> Result<Self> { - std::fs::read(pb) - .map_err(Error::from) - .map(|buffer| UnparsedMail { id, buffer }) - } - - pub fn parse(self) -> Result<Mail> { - Ok(Mail { - id: self.id, - parsed: mailparse::parse_mail(self.buffer.clone())?, - buffer: self.buffer, - }) - } - - pub fn id(&self) -> &String { - &self.id - } -} |