Skip to content
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-880 Fix crash when deserializing/serializing Document that contains decimal128 #285

Merged

Conversation

patrickfreed
Copy link
Contributor

@patrickfreed patrickfreed commented Aug 2, 2021

RUST-880

This PR fixes a crash that occurs in 1.2.x when deserializing from or serializing to a Document that contains a decimal128 when the decimal128 feature flag is not enabled. Note that this has already been fixed on master.

This PR also fixes the clippy failures that started since the latest Rust release.

@patrickfreed patrickfreed marked this pull request as ready for review August 2, 2021 19:38
#[cfg(not(feature = "decimal128"))]
Bson::Decimal128(ref v) => {
doc! {
"$numberDecimalBytes": Bson::Binary(Binary {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This format matches what we went for on master.

@patrickfreed patrickfreed merged commit bed4ff4 into mongodb:1.2.x Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants