Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-759

DropCollectionOptions should skip serializing fields with a None value

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.0.0-beta
    • Affects Version/s: None
    • Component/s: None
    • None

      Most of our options structs include the serde_with::skip_serializing_none attribute to avoid sending null values to the server for unspecified options. We don't include this attribute on DropCollectionOptions, which means that if a user specifies None for write_concern, the server will return a TypeMismatch error. It's likely that this hasn't been encountered since write_concern is the only field in DropCollectionOptions, so users would likely just omit the options completely rather than specifying None; however, we should still fix this to avoid unnecessary errors.

            Assignee:
            isabel.atkinson@mongodb.com Isabel Atkinson
            Reporter:
            isabel.atkinson@mongodb.com Isabel Atkinson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: