Skip to content

Commit 4ff01a3

Browse files
committed
Implement Serialization and Deserialization for Verbosity
This commit adds serialization and deserialization support for the Verbosity type. The verbosity is serialized as an optional log level that represents the equivalent log level given the number of verbose and quiet flags. When deserializing, the log level is converted into a number of verbose and quiet flags, which keeps one of the flags at 0 and the other at the difference between the log level and the default log level. The internal representation in calculations has been changed from i8 to i16 to prevent overflows when performing calculations using u8 values. Fixes: clap-rs#88
1 parent c621a6a commit 4ff01a3

File tree

4 files changed

+654
-16
lines changed

4 files changed

+654
-16
lines changed

Cargo.lock

+291-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)