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

digest: Add AsRef<str> #229

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

Commits on Sep 23, 2024

  1. digest: Add AsRef<str>

    Conceptually `Digest()` is just a parsed string wrapper. Many
    cases want to get access to the full value without allocating,
    and the introduction of the type was a regression from that point of
    view in 0.7.
    
    Luckily, we can change our internals in such a way that it's
    safe to add the impl. Do that by holding onto the full value,
    with a duplicate small boxed str for the algorithm only in
    the degenerate case that it's an unknown type.
    
    If we had this it would have made containers/bootc#800
    less likely.
    
    Signed-off-by: Colin Walters <[email protected]>
    cgwalters committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    8aa75aa View commit details
    Browse the repository at this point in the history