Skip to content

Commit 5c925dd

Browse files
committed
Fix clippy warnings
1 parent f636e27 commit 5c925dd

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

src/status.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -197,23 +197,18 @@ pub struct Link {
197197
pub url: String,
198198
}
199199

200-
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
200+
#[derive(Serialize, Deserialize, Default, Debug, Clone, PartialEq, Eq)]
201201
#[serde(rename_all = "snake_case")]
202202
pub enum BillingInterval {
203203
Yearly,
204+
#[default]
204205
Monthly,
205206
Weekly,
206207
Daily,
207208
Hourly,
208209
Other,
209210
}
210211

211-
impl Default for BillingInterval {
212-
fn default() -> Self {
213-
BillingInterval::Monthly
214-
}
215-
}
216-
217212
#[derive(Serialize, Deserialize, Default, Debug, Clone, PartialEq)]
218213
pub struct MembershipPlan {
219214
pub name: String,
@@ -310,19 +305,14 @@ impl Status {
310305
}
311306
}
312307

313-
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
308+
#[derive(Default, Debug, Copy, Clone, Eq, PartialEq)]
314309
enum StatusBuilderVersion {
310+
#[default]
315311
V0_13,
316312
V14,
317313
Mixed,
318314
}
319315

320-
impl Default for StatusBuilderVersion {
321-
fn default() -> StatusBuilderVersion {
322-
StatusBuilderVersion::V0_13
323-
}
324-
}
325-
326316
/// Builder for the `Status` object.
327317
#[derive(Default, Debug, Clone)]
328318
pub struct StatusBuilder {

0 commit comments

Comments
 (0)