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

Replace DisplayAsDisplay and PathAsDisplay with AsDisplay trait #251

Merged
merged 1 commit into from
Sep 2, 2023

Commits on Sep 1, 2023

  1. Replace DisplayAsDisplay and PathAsDisplay with AsDisplay trait

    Rather than having separate traits implementing as_display method,
    replace DisplayAsDisplay and PathAsDisplay traits with a AsDisplay
    trait.  The difference between those two traits is in the result
    returned by the as_display method.  With AsDisplay trait this is
    captured by an associated type.
    
    The main motivation for the change is making it simpler to support
    no_std builds in the future.  Previously, PathAsDisplay would have to
    be handled specially in such builds on the side of macro expansion.
    Now, thiserror-impl doesn’t need to be aware of any complications
    around AsDisplay since they are all contained in thiserror crate.
    mina86 committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    97eeb45 View commit details
    Browse the repository at this point in the history