Skip to content

Commit 574c05a

Browse files
committed
drive-by clippy fixes
1 parent 54fa96a commit 574c05a

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

crates/email/src/transport.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ pub struct Transport {
3636
inner: Arc<TransportInner>,
3737
}
3838

39+
#[derive(Default)]
3940
enum TransportInner {
41+
#[default]
4042
Blackhole,
4143
Smtp(AsyncSmtpTransport<Tokio1Executor>),
4244
Sendmail(AsyncSendmailTransport<Tokio1Executor>),
@@ -113,11 +115,6 @@ impl Transport {
113115
}
114116
}
115117

116-
impl Default for TransportInner {
117-
fn default() -> Self {
118-
Self::Blackhole
119-
}
120-
}
121118

122119
#[derive(Debug, Error)]
123120
#[error(transparent)]

crates/oauth2-types/src/requests.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,13 @@ impl core::str::FromStr for ResponseMode {
8686
Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Clone, SerializeDisplay, DeserializeFromStr,
8787
)]
8888
#[non_exhaustive]
89+
#[derive(Default)]
8990
pub enum Display {
9091
/// The Authorization Server should display the authentication and consent
9192
/// UI consistent with a full User Agent page view.
9293
///
9394
/// This is the default display mode.
95+
#[default]
9496
Page,
9597

9698
/// The Authorization Server should display the authentication and consent
@@ -135,11 +137,6 @@ impl core::str::FromStr for Display {
135137
}
136138
}
137139

138-
impl Default for Display {
139-
fn default() -> Self {
140-
Self::Page
141-
}
142-
}
143140

144141
/// Value that specifies whether the Authorization Server prompts the End-User
145142
/// for reauthentication and consent.

0 commit comments

Comments
 (0)