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 the Name API more principled #1919

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Make the Name API more principled #1919

wants to merge 4 commits into from

Commits on Apr 5, 2023

  1. Configuration menu
    Copy the full SHA
    2ef67ed View commit details
    Browse the repository at this point in the history
  2. proto: stop deriving Default for Name and LowerName

    It seems surprising for Name::default() to result in an empty,
    but not-FQDN domain name. Callers should probably use Name::root()
    instead.
    djc committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    a741a3f View commit details
    Browse the repository at this point in the history
  3. proto: deprecate Name::from_utf8() in favor of FromStr impl

    It seems like `from_utf8()` and `from_str()` should do exactly the
    same thing. Align the behavior (which was strangely different)
    and deprecate `from_utf8()` in favor of the widely used FromStr trait.
    
    (Note that the `IntoName` impls also used `from_utf8()` instead of
    `from_str_relaxed()`, which made things even more confusing.)
    djc committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    1dde4d4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cf703c0 View commit details
    Browse the repository at this point in the history