Skip to content

Commit 5603e70

Browse files
committed
refactor(proto): use derive macro to implement Default for KA
1 parent 4777249 commit 5603e70

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/proto/h1/conn.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -903,19 +903,14 @@ impl std::ops::BitAndAssign<bool> for KA {
903903
}
904904
}
905905

906-
#[derive(Clone, Copy, Debug)]
906+
#[derive(Clone, Copy, Debug, Default)]
907907
enum KA {
908908
Idle,
909+
#[default]
909910
Busy,
910911
Disabled,
911912
}
912913

913-
impl Default for KA {
914-
fn default() -> KA {
915-
KA::Busy
916-
}
917-
}
918-
919914
impl KA {
920915
fn idle(&mut self) {
921916
*self = KA::Idle;

0 commit comments

Comments
 (0)