-
Notifications
You must be signed in to change notification settings - Fork 162
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
RUST-1243 Failed to deserialize to hashmap when key is enum #613
Comments
Thank you for the detailed and timely report! I've reproduced this failure locally and am investigating. |
I just pushed a fix for this to the bson |
Just did the test again, runs perfectlly. Thanks for such a quick update! And may I ask when will this change be published to crates.io? |
There's another bug I'd like to track down before rolling out a beta.1 release, so probably early next week. |
I see. Then I shall close the issue. |
FYI, I just published |
Versions/Environment
rustc 1.61.0-nightly (8d60bf427 2022-03-19) and rustc 1.59.0 (9d1b2106e 2022-02-23)
What operating system are you using?
Arch linux 5.16.8-zen1-1-zen
What versions of the driver and its dependencies are you using? (Run
cargo pkgid mongodb
&cargo pkgid bson
)https://github.com/mongodb/mongo-rust-driver.git#mongodb:2.2.0-beta
https://github.com/rust-lang/crates.io-index#bson:2.2.0-beta
What version of MongoDB are you using? (Check with the MongoDB shell using
db.version()
)4.4.4
What is your MongoDB topology (standalone, replica set, sharded cluster, serverless)?
standalone
Describe the bug
With structs that have a
HashMap<K, V>
whereK
is anenum
that implementsHash
, mongodb will not correctly deserialize it from the database. This issue only occurs when I use branch2.2.x
. Previous versions that I installed from crates.io works fine. So I assume this is broken by some newly introduced changes.Output:
Code:
The text was updated successfully, but these errors were encountered: