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

refactor(SourceId): merge name and alt_registry_key into one enum #12675

Merged
merged 3 commits into from
Sep 22, 2023

Commits on Sep 21, 2023

  1. Configuration menu
    Copy the full SHA
    a30d9fd View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2023

  1. refactor: merge name and alt_registry_key into one enum

    Both `name` and `alt_registry_key` are mainly used for displaying.
    We can safely merge them into one enum.
    However, `alt_registry_key` is also used for telling if a SourceId is
    from `[registries]` so we need to provide functions to distinguish that.
    weihanglo committed Sep 22, 2023
    Configuration menu
    Copy the full SHA
    17fdd58 View commit details
    Browse the repository at this point in the history
  2. refactor: use registry_key for getting crates.io key

    `registry_key` should always be `crates-io` when `is_crates_io()` is true
    
    This also removes the test verifying `Debug` output,
    whose format doesn't need to be guaranteed.
    weihanglo committed Sep 22, 2023
    Configuration menu
    Copy the full SHA
    23e91c3 View commit details
    Browse the repository at this point in the history