bond: add FromStr/Display for BondAllPortActive#266
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduced support for parsing and displaying BondAllPortActive.
FromStr accepts "dropped", "delivered", "0", and "1".