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

Accept references in insert and replace methods

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.0.0-beta
    • Affects Version/s: None
    • Component/s: None
    • None

      The various methods on Collection<T> that accept a T do so as an owned value, but this isn't required. Doing so requires users to clone their value if they do not want to relinquish ownership of the value, which could be wasteful. To continue to accept owned values too we could accept an impl Borrow<T> (see here for more info)

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

              Created:
              Updated:
              Resolved: