-
Notifications
You must be signed in to change notification settings - Fork 25
Implement Serialization and Deserialization for Verbosity #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pull Request Test Coverage Report for Build 17053845567Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will:
- remove rstest
- serialize to/from LevelFilter instead of Option(Level)
- add a specific test for TOML serialization
- Fix the github lints
- split the i8 change out to another commit (and will raise another PR for it if necessary)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving to LevelFilter made it easy to derive serialize / deserialize using From<LevelFilter>
instead of a custom implementation.
2a3fb79
to
99d104e
Compare
In eb58de2, I rewrote this based on the 3.0 release. Notably this uses the |
I need that Serialise/Deserialize functionality and would like to continue work on it. As far as I understand, the way to go is to have three separate PRs:
Does it sound ok? |
Likely just massaging the commits in this PR would do fine here. Ed has a high bar for small documented commits. Above force push is just a rebase onto the current main. Splitting in process now. |
This will simplify the implementation of Serialization.
This comment was marked as duplicate.
This comment was marked as duplicate.
Updated to serialize and deserialize from lowercase. |
Verbosity is serialized and deserialized using the title case of the VerbosityFilter (e.g. "Debug") The `serde` dependency is gated behind an optional feature flag. Fixes: clap-rs#88
Verbosity is serialized and deserialized using the lowercase of the
VerbosityFilter (e.g. "debug")
The
serde
dependency is gated behind an optional feature flag.Added conversion methods between Verbosity and VerbosityFilter to
simplify the implementation and derived PartialEq, Eq impls on
types where this was necesary for testing.
Fixes: #88