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

Use types to make clere (credential process || token) #10471

Merged
merged 2 commits into from
Mar 11, 2022

Conversation

Eh2406
Copy link
Contributor

@Eh2406 Eh2406 commented Mar 10, 2022

RegistryConfig represents what credentials we have read from disk. It was a

   token: Option<String>,
   credential_process: Option<(PathBuf, Vec<String>)>,

with runtime checks that they were not both Some.
This changes it to be an Enum None|Token|Process.
There is somewhat more code, but I think this is clearer.

This also changed some Option<String> arguments to Option<&str>.

@rust-highfive
Copy link

r? @ehuss

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 10, 2022
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The refactor looks great!

@bors r+

@weihanglo
Copy link
Member

I guess I need to "comment".

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 11, 2022

📌 Commit 9588f83 has been approved by weihanglo

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 11, 2022
@bors
Copy link
Collaborator

bors commented Mar 11, 2022

⌛ Testing commit 9588f83 with merge f955ddc...

@bors
Copy link
Collaborator

bors commented Mar 11, 2022

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing f955ddc to master...

@bors bors merged commit f955ddc into rust-lang:master Mar 11, 2022
@Eh2406 Eh2406 deleted the credential_process branch March 11, 2022 16:31
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 19, 2022
Update cargo

9 commits in 65c82664263feddc5fe2d424be0993c28d46377a..109bfbd055325ef87a6e7f63d67da7e838f8300b
2022-03-09 02:32:56 +0000 to 2022-03-17 21:43:09 +0000
- Refactor RegistryData::load to handle management of the index cache (rust-lang/cargo#10482)
- Separate VCS command paths with "--" (rust-lang/cargo#10483)
- Fix panic when artifact target is used for `[target.'cfg(&lt;target&gt;)'.dependencies` (rust-lang/cargo#10433)
- Bump git2@0.14.2 and libgit2-sys@0.13.2 (rust-lang/cargo#10479)
- vendor: Don't allow multiple values for --sync (rust-lang/cargo#10448)
- Use types to make clere (credential process || token) (rust-lang/cargo#10471)
- Warning on conflicting keys (rust-lang/cargo#10316)
- Registry functions return Poll to enable parallel fetching of index data (rust-lang/cargo#10064)
- Refine the contributor guide (rust-lang/cargo#10468)
@ehuss ehuss added this to the 1.61.0 milestone Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants