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

Override Debug for oneshot::{Sender,Receiver}. #2414

Merged
merged 1 commit into from
May 7, 2021

Commits on May 6, 2021

  1. Override Debug for oneshot::{Sender,Receiver}.

    Prior to this diff, the Debug impl for oneshot channels printed something like:
    ```
    Sender { inner: Inner { complete: false, data: Lock { locked: false, data: UnsafeCell }, rx_task: Lock { locked: false, data: UnsafeCell }, tx_task: Lock { locked: false, data: UnsafeCell } } }
    ```
    which isn't very helpful. Instead, just print
    `Sender { complete: false }` (or `true`, if the other end has dropped).
    
    Note that the `T: Debug` bound is retained to allow for the possibility
    of allowing slightly more interesting debug output in the future.
    goffrie committed May 6, 2021
    Configuration menu
    Copy the full SHA
    3368ca1 View commit details
    Browse the repository at this point in the history