Skip to content

bond: add FromStr/Display for BondAllPortActive#266

Merged
cathay4t merged 1 commit into
rust-netlink:mainfrom
cathay4t:main
Jun 1, 2026
Merged

bond: add FromStr/Display for BondAllPortActive#266
cathay4t merged 1 commit into
rust-netlink:mainfrom
cathay4t:main

Conversation

@cathay4t

@cathay4t cathay4t commented Jun 1, 2026

Copy link
Copy Markdown
Member

Introduced support for parsing and displaying BondAllPortActive.
FromStr accepts "dropped", "delivered", "0", and "1".

@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.19%. Comparing base (1fb4bd7) to head (2e47aca).
⚠️ Report is 51 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #266      +/-   ##
==========================================
+ Coverage   68.10%   68.19%   +0.08%     
==========================================
  Files         144      146       +2     
  Lines       10103    10436     +333     
==========================================
+ Hits         6881     7117     +236     
- Misses       3222     3319      +97     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements the Display and FromStr traits for the BondAllPortActive enum. The review feedback suggests refactoring the FromStr implementation to use a more idiomatic Rust match pattern instead of wrapping the match in Ok and returning an explicit Err. Additionally, it is recommended to add unit tests to verify the correctness of these new implementations.

Comment thread src/link/link_info/bond.rs
Comment thread src/link/link_info/bond.rs
@cathay4t cathay4t changed the title bond: align FromStr/Display strings with iproute2 bond: add FromStr/Display for BondAllPortActive Jun 1, 2026
Introduced support for parsing and displaying BondAllPortActive.
FromStr accepts "dropped", "delivered", "0", and "1".

Unit test cases included.

Signed-off-by: Gris Ge <cnfourt@gmail.com>
@cathay4t cathay4t merged commit b97280b into rust-netlink:main Jun 1, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant