Bump MSRV to 1.63 (#869)

This commit is contained in:
Paolo Barbolini
2023-04-02 11:20:51 +02:00
committed by GitHub
parent 8b588cf275
commit 89673d0eb2
7 changed files with 11 additions and 20 deletions

View File

@@ -75,8 +75,8 @@ jobs:
rust: stable rust: stable
- name: beta - name: beta
rust: beta rust: beta
- name: 1.60.0 - name: 1.63.0
rust: 1.60.0 rust: 1.63.0
steps: steps:
- name: Checkout - name: Checkout

View File

@@ -11,7 +11,7 @@ authors = ["Alexis Mousset <contact@amousset.me>", "Paolo Barbolini <paolo@paolo
categories = ["email", "network-programming"] categories = ["email", "network-programming"]
keywords = ["email", "smtp", "mailer", "message", "sendmail"] keywords = ["email", "smtp", "mailer", "message", "sendmail"]
edition = "2021" edition = "2021"
rust-version = "1.60" rust-version = "1.63"
[badges] [badges]
is-it-maintained-issue-resolution = { repository = "lettre/lettre" } is-it-maintained-issue-resolution = { repository = "lettre/lettre" }

View File

@@ -53,12 +53,12 @@ Lettre does not provide (for now):
## Supported Rust Versions ## Supported Rust Versions
Lettre supports all Rust versions released in the last 6 months. At the time of writing Lettre supports all Rust versions released in the last 6 months. At the time of writing
the minimum supported Rust version is 1.60, but this could change at any time either from the minimum supported Rust version is 1.63, but this could change at any time either from
one of our dependencies bumping their MSRV or by a new patch release of lettre. one of our dependencies bumping their MSRV or by a new patch release of lettre.
## Example ## Example
This library requires Rust 1.60 or newer. This library requires Rust 1.63 or newer.
To use this library, add the following to your `Cargo.toml`: To use this library, add the following to your `Cargo.toml`:
```toml ```toml

View File

@@ -216,7 +216,7 @@ impl Executor for AsyncStd1Executor {
#[cfg(feature = "smtp-transport")] #[cfg(feature = "smtp-transport")]
fn sleep(duration: Duration) -> Self::Sleep { fn sleep(duration: Duration) -> Self::Sleep {
let fut = async move { async_std::task::sleep(duration).await }; let fut = async_std::task::sleep(duration);
Box::pin(fut) Box::pin(fut)
} }

View File

@@ -6,7 +6,7 @@
//! * Secure defaults //! * Secure defaults
//! * Async support //! * Async support
//! //!
//! Lettre requires Rust 1.60 or newer. //! Lettre requires Rust 1.63 or newer.
//! //!
//! ## Features //! ## Features
//! //!

View File

@@ -13,12 +13,14 @@ use crate::BoxError;
/// use-caches this header shouldn't be set manually. /// use-caches this header shouldn't be set manually.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Default)]
pub enum ContentTransferEncoding { pub enum ContentTransferEncoding {
/// ASCII /// ASCII
SevenBit, SevenBit,
/// Quoted-Printable encoding /// Quoted-Printable encoding
QuotedPrintable, QuotedPrintable,
/// base64 encoding /// base64 encoding
#[default]
Base64, Base64,
/// Requires `8BITMIME` /// Requires `8BITMIME`
EightBit, EightBit,
@@ -67,12 +69,6 @@ impl FromStr for ContentTransferEncoding {
} }
} }
impl Default for ContentTransferEncoding {
fn default() -> Self {
ContentTransferEncoding::Base64
}
}
#[cfg(test)] #[cfg(test)]
mod test { mod test {
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;

View File

@@ -99,7 +99,7 @@ impl Debug for Tls {
/// Source for the base set of root certificates to trust. /// Source for the base set of root certificates to trust.
#[allow(missing_copy_implementations)] #[allow(missing_copy_implementations)]
#[derive(Clone, Debug)] #[derive(Clone, Debug, Default)]
pub enum CertificateStore { pub enum CertificateStore {
/// Use the default for the TLS backend. /// Use the default for the TLS backend.
/// ///
@@ -110,6 +110,7 @@ pub enum CertificateStore {
/// enabled, or will fall back to `webpki-roots`. /// enabled, or will fall back to `webpki-roots`.
/// ///
/// The boring-tls backend uses the same logic as OpenSSL on all platforms. /// The boring-tls backend uses the same logic as OpenSSL on all platforms.
#[default]
Default, Default,
/// Use a hardcoded set of Mozilla roots via the `webpki-roots` crate. /// Use a hardcoded set of Mozilla roots via the `webpki-roots` crate.
/// ///
@@ -120,12 +121,6 @@ pub enum CertificateStore {
None, None,
} }
impl Default for CertificateStore {
fn default() -> Self {
CertificateStore::Default
}
}
/// Parameters to use for secure clients /// Parameters to use for secure clients
#[derive(Clone)] #[derive(Clone)]
pub struct TlsParameters { pub struct TlsParameters {