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

Make AsciiSet values instead of refs - non-breaking version #976

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

Commits on Sep 27, 2024

  1. Make AsciiSet consts and fields values

    Refs take 8 bytes, whereas the values are only 16 bytes, so there is not
    a huge benefit to using references rather than values. PercentEncoding
    is changed to store the AsciiSet as a value, and the functions that take
    AsciiSet now take Into<AsciiSet> instead of &'static AsciiSet. This
    allows existing code to continue to work without modification. The
    AsciiSet consts (CONTROLS and NON_ALPHANUMERIC) are also changed to be
    values, which is a breaking change, but will only affect code that
    attempts to dereference them.
    
    Discussion about the rationale for this is change is at
    <servo#970 (comment)>
    joshka committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    888596e View commit details
    Browse the repository at this point in the history