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 M-sync labels Sep 25, 2021
Copy link
Contributor

@Darksonn Darksonn left a comment

Thanks!

@Darksonn Darksonn merged commit 1073f6e into tokio-rs:master Sep 26, 2021
29 checks passed
@steffahn steffahn deleted the mutex_debug_unsized branch Sep 26, 2021
suikammd pushed a commit to suikammd/tokio that referenced this issue Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio M-sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants