Skip to content

Commit

Permalink
Implement Serialization and Deserialization for Verbosity
Browse files Browse the repository at this point in the history
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: #88
  • Loading branch information
joshka committed Sep 20, 2024
1 parent c621a6a commit 4ff01a3
Show file tree
Hide file tree
Showing 4 changed files with 654 additions and 16 deletions.
299 changes: 291 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4ff01a3

Please sign in to comment.