~soywod/pimalaya

Fix building without IMAP feature v1 SUPERSEDED

Hugo Osvaldo Barrera: 1
 Fix building without IMAP feature

 2 files changed, 6 insertions(+), 3 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~soywod/pimalaya/patches/40080/mbox | git am -3
Learn more about email & git

[PATCH] Fix building without IMAP feature Export this patch

Fixes (and can be tested with):

    cargo build --features=smtp-sender --no-default-features
---
 src/backend/backend.rs    | 4 +++-
 src/domain/email/email.rs | 5 +++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/backend/backend.rs b/src/backend/backend.rs
index e137934..d787f94 100644
--- a/src/backend/backend.rs
+++ b/src/backend/backend.rs
@@ -10,8 +10,10 @@ use thiserror::Error;

use crate::{
    account, backend, email, envelope, folder, id_mapper, AccountConfig, BackendConfig, Emails,
    Envelope, Envelopes, Flag, Flags, Folders, ImapBackendBuilder, MaildirBackend, MaildirConfig,
    Envelope, Envelopes, Flag, Flags, Folders, MaildirBackend, MaildirConfig,
};
#[cfg(feature = "imap-backend")]
use crate::ImapBackendBuilder;

#[cfg(feature = "notmuch-backend")]
use crate::NotmuchBackend;
diff --git a/src/domain/email/email.rs b/src/domain/email/email.rs
index 551e77c..e2d8329 100644
--- a/src/domain/email/email.rs
+++ b/src/domain/email/email.rs
@@ -1,4 +1,6 @@
#[cfg(feature = "imap-backend")]
use imap::types::{Fetch, Fetches};

use lettre::{
    address::AddressError,
    message::{Mailbox, Mailboxes},
@@ -34,8 +36,7 @@ pub enum Error {
    #[error("cannot delete local draft at {1}")]
    DeleteLocalDraftError(#[source] io::Error, PathBuf),

    #[cfg(feature = "imap-backend")]
    #[error("cannot parse email from imap fetches: empty fetches")]
    #[error("cannot parse email: empty fetches")]
    ParseEmailFromImapFetchesEmptyError,

    #[error(transparent)]
-- 
2.40.0
Is your develop branch up-to-date? I cannot apply your patch somehow
I manually applied your patch at [97523e9]. Thank you!

[97523e9]: https://git.sr.ht/~soywod/pimalaya/commit/97523e989495198ea5718eeb237f72ef0ccf86a8