Skip to content

feat: impl TraversableMut for Mutex and RwLock#18

Merged
tisonkun merged 1 commit into
mainfrom
traversable-mut-for-lock
Jun 2, 2026
Merged

feat: impl TraversableMut for Mutex and RwLock#18
tisonkun merged 1 commit into
mainfrom
traversable-mut-for-lock

Conversation

@tisonkun

@tisonkun tisonkun commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: tison <wander4096@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds TraversableMut implementations for std::sync::Mutex<T> and std::sync::RwLock<T> so callers can perform mutable traversal directly through these synchronization wrappers when they have &mut access.

Changes:

  • Implement TraversableMut for Mutex<T> using Mutex::get_mut().
  • Implement TraversableMut for RwLock<T> using RwLock::get_mut().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread traversable/src/lib.rs
Comment thread traversable/src/lib.rs
@tisonkun tisonkun merged commit 957cb7c into main Jun 2, 2026
10 checks passed
@tisonkun tisonkun deleted the traversable-mut-for-lock branch June 2, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants