Skip to content

Commit 763cc26

Browse files
committed
clippy
1 parent b2bbe2c commit 763cc26

1 file changed

Lines changed: 4 additions & 14 deletions

File tree

src/sqlite/def/column.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -231,21 +231,16 @@ impl From<&SqliteRow> for ForeignKeysInfo {
231231
}
232232

233233
/// Indexes the actions performed on the foreign keys of a table
234-
#[derive(Debug, PartialEq, Eq, Clone)]
234+
#[derive(Debug, Default, PartialEq, Eq, Clone)]
235235
pub enum ForeignKeyAction {
236+
#[default]
236237
NoAction,
237238
Restrict,
238239
SetNull,
239240
SetDefault,
240241
Cascade,
241242
}
242243

243-
impl Default for ForeignKeyAction {
244-
fn default() -> Self {
245-
Self::NoAction
246-
}
247-
}
248-
249244
impl From<&str> for ForeignKeyAction {
250245
fn from(action: &str) -> Self {
251246
match action {
@@ -272,20 +267,15 @@ impl ForeignKeyAction {
272267
}
273268

274269
/// Maps to the SQLite `MATCH` actions
275-
#[derive(Debug, PartialEq, Eq, Clone)]
270+
#[derive(Debug, Default, PartialEq, Eq, Clone)]
276271
pub enum MatchAction {
277272
Simple,
278273
Partial,
279274
Full,
275+
#[default]
280276
None,
281277
}
282278

283-
impl Default for MatchAction {
284-
fn default() -> Self {
285-
Self::None
286-
}
287-
}
288-
289279
impl From<&str> for MatchAction {
290280
fn from(action: &str) -> Self {
291281
match action {

0 commit comments

Comments
 (0)