Skip to content

Commit e21122e

Browse files
mmynkcathay4t
authored andcommitted
Add Default macro for non-exhaustive types
1 parent fb497b3 commit e21122e

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/tc/qdiscs/fq_codel.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl Emitable for TcFqCodelXstats {
9090
}
9191
}
9292

93-
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
93+
#[derive(Default, Debug, PartialEq, Eq, Clone, Copy)]
9494
#[non_exhaustive]
9595
pub struct TcFqCodelQdStats {
9696
pub maxpacket: u32,
@@ -151,7 +151,7 @@ impl Emitable for TcFqCodelQdStats {
151151
}
152152
}
153153

154-
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
154+
#[derive(Default, Debug, PartialEq, Eq, Clone, Copy)]
155155
#[non_exhaustive]
156156
pub struct TcFqCodelClStats {
157157
deficit: i32,

src/tc/stats/basic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use netlink_packet_utils::{
66
};
77

88
/// Byte/Packet throughput statistics
9-
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
9+
#[derive(Default, Debug, PartialEq, Eq, Clone, Copy)]
1010
#[non_exhaustive]
1111
pub struct TcStatsBasic {
1212
/// number of seen bytes

src/tc/stats/compat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use netlink_packet_utils::{
66
};
77

88
/// Generic queue statistics
9-
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
9+
#[derive(Default, Debug, PartialEq, Eq, Clone, Copy)]
1010
#[non_exhaustive]
1111
pub struct TcStats {
1212
/// Number of enqueued bytes

src/tc/stats/queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use netlink_packet_utils::{
66
};
77

88
/// Queuing statistics
9-
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
9+
#[derive(Default, Debug, PartialEq, Eq, Clone, Copy)]
1010
#[non_exhaustive]
1111
pub struct TcStatsQueue {
1212
/// queue length

0 commit comments

Comments
 (0)