Closed TedDriggs closed 5 years ago
I was expecting the first thing to be right too, I'll look into this. About the second one I'm not sure if that's needed.
what exactly isn't snake_case here? and I'm thinking maybe to throw an Error if ok/err is used on non Result function, this might be in combination with #2
Fixed By your PR #8
Consider the following code:
What level of log message will this emit?
The answer turns out to be trace, because the
ok = "Trace"
overrules theINFO
andWarn
elements, despite the return value not being a result.Removing the
ok
clause causes these to become warnings: TheWarn
word overwrites the earlierINFO
word.There are a few things I was expecting to be different here.
serde
handles it (example).While I get the desire to be permissive with input here, I also sort of wish the library was more particular about casing and positioning, requiring:
level = "warn"
with the first position being a magic shorthand.