Crate logchop[−][src]
Log your Result
and Option
chains with inline methods.
First, import all traits:
use logchop::*;
This will extend Option
and Result
with new methods. Now
you can turn:
return match maybe_something { Some(x) => Some(x), None => { debug!("Nothing found!"); None } }
into
return maybe_something.debug_none("Nothing found!")
😗🤌
The full list of methods exposed are available on the respective types
Traits
OptionLogFormatter | Augment |
OptionLogger | Augment |
ResultLogFormatter | Augment |
ResultLogger | Augment |