Skip to content

Rename _type to loc_type in resolve_with_default#91

Merged
redpanda-f merged 2 commits intofeat/redpanda/latesttag-resolverfrom
copilot/sub-pr-83
Mar 11, 2026
Merged

Rename _type to loc_type in resolve_with_default#91
redpanda-f merged 2 commits intofeat/redpanda/latesttag-resolverfrom
copilot/sub-pr-83

Conversation

Copy link
Contributor

Copilot AI commented Mar 11, 2026

The variable _type in resolve_with_default used a leading underscore, which in Rust conventionally signals an intentionally unused variable — misleading since it's actively used in the match arm and error message.

  • src/config.rs: Rename _typeloc_type in the destructured tuple and its two usage sites within resolve_with_default
// Before
let (_type, url, selector) = canonical_location;
match _type.as_ref() { ... }

// After
let (loc_type, url, selector) = canonical_location;
match loc_type.as_ref() { ... }

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on Latesttag location resolver Rename _type to loc_type in resolve_with_default Mar 11, 2026
@redpanda-f redpanda-f marked this pull request as ready for review March 11, 2026 13:14
@redpanda-f redpanda-f merged commit 56423bf into feat/redpanda/latesttag-resolver Mar 11, 2026
@redpanda-f redpanda-f deleted the copilot/sub-pr-83 branch March 11, 2026 13:15
redpanda-f added a commit that referenced this pull request Mar 13, 2026
* feat: add LatestTag location resolver for init-time tag discovery

* makehappy: fmt

* Update src/commands/init/latest_resolver.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/commands/init/repositories.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/config.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/config.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor: decompose `fetch_latest_tag` into focused helpers with module-level constant (#85)

* Initial plan

* refactor: decompose fetch_latest_tag into focused helpers with module-level constant

Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com>

* fix: remove usage of deprecated methods

* fix: new resolver

* fixup: latesttag

* fixup: clippy issues

* Update src/config.rs

Co-authored-by: Rod Vagg <rod@vagg.org>

* Rename `_type` to `loc_type` in `resolve_with_default` (#91)

* Initial plan

* rename _type to loc_type in resolve_with_default

Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com>

* Simplify `latesttag` branch with early return, drop lifetime workaround (#93)

* Initial plan

* Simplify latesttag handling with early return, drop lifetimes dance

Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com>

* Fix invalid `v/*` glob example — replace with `v*` throughout (#92)

* Initial plan

* Replace invalid v/* glob pattern with v* in docs and code

Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com>
Co-authored-by: Rod Vagg <rod@vagg.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants