diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 457e113..e538b35 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -75,8 +75,8 @@ jobs: rust: stable - name: beta rust: beta - - name: 1.60.0 - rust: 1.60.0 + - name: 1.63.0 + rust: 1.63.0 steps: - name: Checkout diff --git a/Cargo.toml b/Cargo.toml index d23ea05..2247ec9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ authors = ["Alexis Mousset ", "Paolo Barbolini Self::Sleep { - let fut = async move { async_std::task::sleep(duration).await }; + let fut = async_std::task::sleep(duration); Box::pin(fut) } diff --git a/src/lib.rs b/src/lib.rs index 717a338..c1eb9c7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,7 +6,7 @@ //! * Secure defaults //! * Async support //! -//! Lettre requires Rust 1.60 or newer. +//! Lettre requires Rust 1.63 or newer. //! //! ## Features //! diff --git a/src/message/header/content.rs b/src/message/header/content.rs index a61faf8..1220318 100644 --- a/src/message/header/content.rs +++ b/src/message/header/content.rs @@ -13,12 +13,14 @@ use crate::BoxError; /// use-caches this header shouldn't be set manually. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[derive(Default)] pub enum ContentTransferEncoding { /// ASCII SevenBit, /// Quoted-Printable encoding QuotedPrintable, /// base64 encoding + #[default] Base64, /// Requires `8BITMIME` EightBit, @@ -67,12 +69,6 @@ impl FromStr for ContentTransferEncoding { } } -impl Default for ContentTransferEncoding { - fn default() -> Self { - ContentTransferEncoding::Base64 - } -} - #[cfg(test)] mod test { use pretty_assertions::assert_eq; diff --git a/src/transport/smtp/client/tls.rs b/src/transport/smtp/client/tls.rs index 2824951..0fab24a 100644 --- a/src/transport/smtp/client/tls.rs +++ b/src/transport/smtp/client/tls.rs @@ -99,7 +99,7 @@ impl Debug for Tls { /// Source for the base set of root certificates to trust. #[allow(missing_copy_implementations)] -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub enum CertificateStore { /// Use the default for the TLS backend. /// @@ -110,6 +110,7 @@ pub enum CertificateStore { /// enabled, or will fall back to `webpki-roots`. /// /// The boring-tls backend uses the same logic as OpenSSL on all platforms. + #[default] Default, /// Use a hardcoded set of Mozilla roots via the `webpki-roots` crate. /// @@ -120,12 +121,6 @@ pub enum CertificateStore { None, } -impl Default for CertificateStore { - fn default() -> Self { - CertificateStore::Default - } -} - /// Parameters to use for secure clients #[derive(Clone)] pub struct TlsParameters {