-
Notifications
You must be signed in to change notification settings - Fork 119
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
Option::<bool>::from_value_opt behavior #148
Comments
Hi, @wqfish.
This behavior is explicitly stated in the docs (see the table here). Did you get this value from the server or it was created artificially? Note that you should never get boolean value from the server as
Oh, thanks for pointing this out! CI couldn't catch this because of a bug in cargo (see rust-lang/cargo#1796). Please use |
Ah just artificial values. I'll look into the docs. |
The following code prints
Some(true)
.The following code panics:
Is it expected that
Int(1)
can be converted toOption<bool>
whileUInt(1)
can't?BTW I'm on version 0.25. The newer versions fail to compile (a bunch of tokio errors):
The text was updated successfully, but these errors were encountered: