-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test for log::Level deserialization #188
Conversation
I believe to make this complete case-insensitive you would need to fix the check here: Line 249 in bf09a73
As this is checked for before even the actual |
Okay, so I have a patch, but it does not work. It is here It is way harder to implement this, because the relevant code is deeply tied into serde and we cannot simply add settings to it. The problematic line is matthiasbeyer@33b8cf0#diff-be1c878c753064b7eaddf4a10ba4215a93dd1817d31e6788691cdb29752fd612R545 . I could, in theory, remove the I must say, I'm not sure whether this is possible at all, without rewriting large parts of this crate. |
My question is why not let the enum try an deserialize itself? Why is the crate checking for a specific variant at all? You could try constructing a StrDeserializer directly. |
TBH I don't know yet why this is done. I hope I get the chance to investigate this. |
Signed-off-by: Matthias Beyer <[email protected]>
Signed-off-by: Matthias Beyer <[email protected]>
8e8a9d9
to
98562aa
Compare
Signed-off-by: Matthias Beyer <[email protected]>
This test no longer works because we removed case sensitivity. Signed-off-by: Matthias Beyer <[email protected]>
98562aa
to
912f1ed
Compare
So the original title of this PR does not apply anymore. The patches here only test whether log levels can be deserialized. I'll change the title accordingly. Still nice to get these patches in, after 1.5 years 😆 |
This is an attempt to tackle #136