Skip to content

Commit 29026b9

Browse files
authored
fix(trogon-gateway): derive source status default (#121)
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
1 parent 7e02353 commit 29026b9

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

rsworkspace/crates/trogon-gateway/src/source_status.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
use std::fmt;
22
use std::str::FromStr;
33

4-
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
4+
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
55
pub enum SourceStatus {
6+
#[default]
67
Enabled,
78
Disabled,
89
}
910

10-
impl Default for SourceStatus {
11-
fn default() -> Self {
12-
Self::Enabled
13-
}
14-
}
15-
1611
impl SourceStatus {
1712
pub fn is_enabled(self) -> bool {
1813
matches!(self, Self::Enabled)

0 commit comments

Comments
 (0)