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

Build RawArrayBuf without allocating a Vec in rawbson macro

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • Labels:

      The rawbson! macro currently builds RawArrayBuf by collecting all the elements into a Vec and then using RawArrayBuf's FromIter implementation. The Vec allocation could be avoided by directly building a RawArrayBuf, as is done for RawDocumentBuf.

            Assignee:
            Unassigned Unassigned
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: