Skip to content

Commit eacf67f

Browse files
committed
link: Add non_exhaustive to bond classes
Adding `non_exhaustive` to these bond properties: * `BondArpValidate` * `BondPrimaryReselect` * `BondXmitHashPolicy` * `BondArpAllTargets` * `BondFailOverMac` Signed-off-by: Gris Ge <[email protected]>
1 parent eef9be7 commit eacf67f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/link/link_info/bond.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ impl std::fmt::Display for BondMode {
226226
}
227227

228228
#[derive(Debug, Clone, Copy, Eq, PartialEq, Default)]
229+
#[non_exhaustive]
229230
pub enum BondArpValidate {
230231
#[default]
231232
None,
@@ -287,6 +288,7 @@ impl std::fmt::Display for BondArpValidate {
287288
}
288289

289290
#[derive(Debug, Clone, Copy, Eq, PartialEq, Default)]
291+
#[non_exhaustive]
290292
pub enum BondPrimaryReselect {
291293
#[default]
292294
Always,
@@ -332,6 +334,7 @@ impl std::fmt::Display for BondPrimaryReselect {
332334
}
333335

334336
#[derive(Debug, Clone, Copy, Eq, PartialEq, Default)]
337+
#[non_exhaustive]
335338
pub enum BondXmitHashPolicy {
336339
#[default]
337340
Layer2,
@@ -389,6 +392,7 @@ impl std::fmt::Display for BondXmitHashPolicy {
389392
}
390393

391394
#[derive(Debug, Clone, Copy, Eq, PartialEq, Default)]
395+
#[non_exhaustive]
392396
pub enum BondArpAllTargets {
393397
#[default]
394398
Any,
@@ -430,6 +434,7 @@ impl std::fmt::Display for BondArpAllTargets {
430434
}
431435

432436
#[derive(Debug, Clone, Copy, Eq, PartialEq, Default)]
437+
#[non_exhaustive]
433438
pub enum BondFailOverMac {
434439
#[default]
435440
None,

0 commit comments

Comments
 (0)