diff --git a/src/importer/formats/gmailbackup/filesystem.rs b/src/importer/formats/gmailbackup/filesystem.rs deleted file mode 100644 index b83aa12..0000000 --- a/src/importer/formats/gmailbackup/filesystem.rs +++ /dev/null @@ -1,14 +0,0 @@ -use eyre::Result; - -use super::super::shared::filesystem::{emails_in, folders_in}; -use super::super::MessageSender; -use super::raw_email::RawEmailEntry; -use crate::types::Config; - -pub fn read_emails(config: &Config, sender: MessageSender) -> Result> { - Ok(folders_in( - &config.emails_folder_path, - sender, - |path, sender| emails_in(path, sender, RawEmailEntry::new), - )?) -} diff --git a/src/importer/formats/gmailbackup/mod.rs b/src/importer/formats/gmailbackup/mod.rs index f4d105d..df209f2 100644 --- a/src/importer/formats/gmailbackup/mod.rs +++ b/src/importer/formats/gmailbackup/mod.rs @@ -1,8 +1,9 @@ -mod filesystem; mod meta; mod raw_email; +use super::shared::filesystem::{emails_in, folders_in}; use super::{Config, ImporterFormat, MessageSender, Result}; +use raw_email::RawEmailEntry; #[derive(Default)] pub struct Gmail {} @@ -10,6 +11,10 @@ pub struct Gmail {} impl ImporterFormat for Gmail { type Item = raw_email::RawEmailEntry; fn emails(&self, config: &Config, sender: MessageSender) -> Result> { - filesystem::read_emails(config, sender) + Ok(folders_in( + &config.emails_folder_path, + sender, + |path, sender| emails_in(path, sender, RawEmailEntry::new), + )?) } }