-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
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.