LogChop
It's better than bad, it's good!
Log your Result
and Option
chains with inline methods.
Turn
match maybe_something .
into
maybe_something.debug_none
This becomes handy when you start chaining from results
use *;
parse_id_string
.trace_ok
.debug_err
.map_or_else
.info_ok_format
# Sucessful parse result
[trace] Found id: 12
[info ] Found widget: chainsaw
# Error parsing result
[debug] Couldn't parse ID: Invalid format
[info ] Found widget: concilation prize
Say goodbye to unnecessary blocks!
Documentation
Installation and Usage
Add the following to your Cargo.toml
:
= "0.1"
and then import traits: use logchop::*