Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit a7ec4bd

Browse files
committed
Fix 'derivable_impls' clippy warning
Signed-off-by: Joseph Livesey <jlivesey@gmail.com>
1 parent 4362147 commit a7ec4bd

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

validator/src/journal/block_wrapper.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,16 @@ use std::fmt;
2121

2222
use cpython::{self, ObjectProtocol, PyClone, PyObject};
2323

24-
#[derive(Debug, Clone, PartialEq, Eq)]
24+
#[derive(Debug, Default, Clone, PartialEq, Eq)]
2525
pub enum BlockStatus {
26+
#[default]
2627
Unknown = 0,
2728
Invalid = 1,
2829
Valid = 2,
2930
Missing = 3,
3031
InValidation = 5,
3132
}
3233

33-
impl Default for BlockStatus {
34-
fn default() -> Self {
35-
BlockStatus::Unknown
36-
}
37-
}
38-
3934
#[derive(Debug)]
4035
pub struct BlockWrapper {
4136
pub(super) py_block_wrapper: PyObject,

validator/src/metrics/mod.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,12 @@ pub fn get_collector<S: AsRef<str>>(name: S) -> MetricsCollectorHandle {
3232
}
3333
}
3434

35-
#[derive(Copy, Clone)]
35+
#[derive(Copy, Clone, Default)]
3636
pub enum Level {
37+
#[default]
3738
Info,
3839
}
3940

40-
impl Default for Level {
41-
fn default() -> Self {
42-
Level::Info
43-
}
44-
}
45-
4641
fn into_level_str(level: Level) -> &'static str {
4742
use self::Level::*;
4843
match level {

0 commit comments

Comments
 (0)