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

tracing-core: relax get_default's argument to FnOnce #2292

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Aug 30, 2022

  1. tracing-core: relax get_default's argument to FnOnce

    This change increases the flexibility of `get_default`.
    
    It was already the case that `get_default`'s argument was only
    invoked at-most once. However, the compiler could not prove this,
    and thus required that the argument be `FnMut`. This commit
    introduces `UnsafeFnMut`, a type that wraps an `FnOnce` and
    provides an unsafe interface for invoking it in cases where the
    compiler cannot otherwise prove that it's only invoked at-most
    once.
    jswrenn committed Aug 30, 2022
    Configuration menu
    Copy the full SHA
    f728225 View commit details
    Browse the repository at this point in the history