Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand Debug for Mutex<T> implementation to unsized T #4134

Merged
merged 1 commit into from Sep 26, 2021
Merged

Expand Debug for Mutex<T> implementation to unsized T #4134

merged 1 commit into from Sep 26, 2021

Conversation

steffahn
Copy link
Contributor

@steffahn steffahn commented Sep 25, 2021

This follows precedent of e.g. the standard library. Adds a level of indirection in order to still be able to coerce the argument to a &dyn Debug.

I tried to do an exhaustive search, AFAICT this seems to be the only type in this repo with an ?Sized type argument that has a too restrictive (<T: ?Sized>) impl for Debug.

@Darksonn Darksonn added A-tokio Area: The main tokio crate M-sync Module: tokio/sync labels Sep 25, 2021
Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

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

Thanks!

@Darksonn Darksonn merged commit 1073f6e into tokio-rs:master Sep 26, 2021
@steffahn steffahn deleted the mutex_debug_unsized branch September 26, 2021 12:00
suikammd pushed a commit to suikammd/tokio that referenced this pull request Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-sync Module: tokio/sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants