From 1fc8145e01ff97d2b145b10ea3ac08eb5450ebce Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Mon, 20 Oct 2025 13:48:49 +0100 Subject: [PATCH] drive-by clippy fixes --- crates/email/src/transport.rs | 7 ++----- crates/oauth2-types/src/requests.rs | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/crates/email/src/transport.rs b/crates/email/src/transport.rs index 9161d76e5..4b31579d4 100644 --- a/crates/email/src/transport.rs +++ b/crates/email/src/transport.rs @@ -36,7 +36,9 @@ pub struct Transport { inner: Arc, } +#[derive(Default)] enum TransportInner { + #[default] Blackhole, Smtp(AsyncSmtpTransport), Sendmail(AsyncSendmailTransport), @@ -113,11 +115,6 @@ impl Transport { } } -impl Default for TransportInner { - fn default() -> Self { - Self::Blackhole - } -} #[derive(Debug, Error)] #[error(transparent)] diff --git a/crates/oauth2-types/src/requests.rs b/crates/oauth2-types/src/requests.rs index ac0770411..313330c2d 100644 --- a/crates/oauth2-types/src/requests.rs +++ b/crates/oauth2-types/src/requests.rs @@ -86,11 +86,13 @@ impl core::str::FromStr for ResponseMode { Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Clone, SerializeDisplay, DeserializeFromStr, )] #[non_exhaustive] +#[derive(Default)] pub enum Display { /// The Authorization Server should display the authentication and consent /// UI consistent with a full User Agent page view. /// /// This is the default display mode. + #[default] Page, /// The Authorization Server should display the authentication and consent @@ -135,11 +137,6 @@ impl core::str::FromStr for Display { } } -impl Default for Display { - fn default() -> Self { - Self::Page - } -} /// Value that specifies whether the Authorization Server prompts the End-User /// for reauthentication and consent.