Skip to content

Commit

Permalink
Simplify pattern matching
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Liu <[email protected]>
  • Loading branch information
austin362667 committed Sep 2, 2024
1 parent fa5a470 commit 48c0403
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ fn complete_registry(opt: &PublishOpt) -> Result<Registry> {
{
let normalized_url = PublishOpt::normalize_url(repository_url);
let name = match normalized_url {
normalized if normalized == PublishOpt::DEFAULT_REPOSITORY_URL => Some("pypi"),
normalized if normalized == PublishOpt::TEST_REPOSITORY_URL => Some("testpypi"),
PublishOpt::DEFAULT_REPOSITORY_URL => Some("pypi"),
PublishOpt::TEST_REPOSITORY_URL => Some("testpypi"),
_ => None,
};
(name, repository_url.to_string())
Expand Down

0 comments on commit 48c0403

Please sign in to comment.