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

Add unit test for Document::extend

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • bson-2.0.0-beta.2
    • Affects Version/s: None
    • Component/s: None
    • None

      It would make sense to have functionality on Document similar to Vec::extend

      Issue originally filed by gembin on GitHub https://github.com/mongodb/bson-rust/issues/192

      let doc1 = doc!
      Unknown macro: { "field1"}
      let doc2 = doc!
      Unknown macro: { "field2"}
      Merged doc:

      let merged_doc = doc!
      Unknown macro: { "field1"}
      I know there is an API: doc1.insert("field2", "value2");
      I think it would be great if have an API like this: doc1.merge(doc2)

      Add a unit test to verify this functionality.

            Assignee:
            nathan.blinn@mongodb.com Nathan Blinn
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: