-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
mlokr has created PR #948: fixing the find or delete serde inconsistency in mongo-rust-driver
Issue Text:
Hello,
I found an inconsistency in the way mongo documents are deserialized when using `serde(with)` and `find_one_and_delete`. My fix might nor be ideal because it breaks
```
< operation::find_and_modify::test::handle_no_value_delete
< operation::find_and_modify::test::handle_no_value_replace
< operation::find_and_modify::test::handle_no_value_update
```
The tests no longer return `Err(_)` but just `Ok(None)`. I am not sure how I can assert that Field is present but can be null, when deserializing `Option<T>` and could not find anything either.
I added a tests to verify my changes fix the issue (see changes)