diff --git a/src/upload.rs b/src/upload.rs index 267b6ca2c..8ee18e47a 100644 --- a/src/upload.rs +++ b/src/upload.rs @@ -322,8 +322,8 @@ fn complete_registry(opt: &PublishOpt) -> Result { { 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())