summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-07-23 15:30:26 +0200
committerMatthias Beyer <mail@beyermatthias.de>2020-07-23 15:30:26 +0200
commit62cfbde13e1fad13278da726429b649b6921c60b (patch)
tree85b42035884ffec761c446b6f767cc4e87870038 /src
parent31cb35a0c2d87ec227188c55ba3887698e7c4822 (diff)
Remove unused type
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src')
-rw-r--r--src/mail.rs25
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
- }
-}