mongodb / mongodb/mongo-rust-driver

RUST-1545 Consider removing the take_mut dependency

Open
#776 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

tracked-in-jira
Dominant language
Rust
Stars
1.5k
Forks
201
Avg merge
1d 7h
Merged PRs (30d)
22

Description

Versions/Environment

  1. What version of Rust are you using?
    Rust 1.65
  2. What operating system are you using?
    N/A
  3. What versions of the driver and its dependencies are you using? (Run
    cargo pkgid mongodb & cargo pkgid bson)
    Driver v2.3.1
  4. What version of MongoDB are you using? (Check with the MongoDB shell using db.version())
    N/A
  5. What is your MongoDB topology (standalone, replica set, sharded cluster, serverless)?
    N/A

Describe the bug

There is a potential memory leak in take_mut, which I noted from 2 issues filed with cargo-crev. A pull request with a fix was opened several years ago and it hasn't been merged yet, so the repository might also be rightly considered abandoned.

Is this dependency necessary? Something to consider, as it also uses unproven unsafe code.

https://github.com/yvt/crev-proofs and https://github.com/vorner/crev-proofs both reported issues.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the take_mut dependency through the driver's Rust source and checking whether the reported upstream fix addresses the cargo-crev concerns. Done means determining whether it can be removed or safely replaced, with the driver's existing behavior preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.