stalwartlabs / mail-send

E-mail delivery library for Rust with DKIM support
https://docs.rs/mail-send/
Apache License 2.0
202 stars 21 forks source link

Fails to compile (Even in hello world) #6

Closed sonicrules1234 closed 2 years ago

sonicrules1234 commented 2 years ago

Adding this crate to even cargo's default hello world program causes it to fail to compile:

error[E0599]: &HeaderType<'_> is not an iterator --> /home/westly/.cargo/registry/src/github.com-1ecc6299db9ec823/mail-send-0.2.0/src/smtp/message.rs:160:91 160 if let Some(HeaderType::Address(address::Address::Address(addr))) = value.last() { ^^^^ &HeaderType<'_> is not an iterator
::: /home/westly/.cargo/registry/src/github.com-1ecc6299db9ec823/mail-builder-0.2.1/src/headers/mod.rs:32:1 32 pub enum HeaderType<'x> { ----------------------- doesn't satisfy HeaderType<'_>: Iterator
= note: the following trait bounds were not satisfied:
        `&HeaderType<'_>: Iterator`
        which is required by `&mut &HeaderType<'_>: Iterator`
        `HeaderType<'_>: Iterator`
        which is required by `&mut HeaderType<'_>: Iterator`
error[E0277]: &HeaderType<'_> is not an iterator --> /home/westly/.cargo/registry/src/github.com-1ecc6299db9ec823/mail-send-0.2.0/src/smtp/message.rs:170:29 170 for addr in value { ^^^^^ &HeaderType<'_> is not an iterator
= help: the trait `Iterator` is not implemented for `&HeaderType<'_>`
= note: required because of the requirements on the impl of `IntoIterator` for `&HeaderType<'_>`

Some errors have detailed explanations: E0277, E0599. For more information about an error, try rustc --explain E0277. error: could not compile mail-send due to 2 previous errors warning: build failed, waiting for other jobs to finish...

mdecimus commented 2 years ago

Thanks, this is now fixed on version 0.2.1 of mail-send.