File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -157,19 +157,19 @@ impl<'a> PackageUrl<'a> {
157
157
N : Into < Cow < ' a , str > > ,
158
158
{
159
159
// Fail if namespace is prohibited for this type
160
- if matches ! (
161
- self . ty . as_ref ( ) ,
162
- "bitnami" | "cargo " | "cocoapods " | "conda " | "cran" | "gem"
163
- | "hackage" | "mlflow" | "nuget" | "oci" | "pub" | "pypi"
164
- ) {
165
- return Err ( Error :: TypeProhibitsNamespace ( self . ty . to_string ( ) ) )
160
+ match self . ty . as_ref ( ) {
161
+ "bitnami" | "cargo" | "cocoapods" | "conda" | "cran" | "gem" | "hackage" | "mlflow"
162
+ | "nuget " | "oci " | "pub " | "pypi" => {
163
+ return Err ( Error :: TypeProhibitsNamespace ( self . ty . to_string ( ) ) ) ;
164
+ }
165
+ _ => { }
166
166
}
167
167
168
168
// Lowercase namespace if needed for this type
169
169
let mut n = namespace. into ( ) ;
170
170
match self . ty . as_ref ( ) {
171
- "apk" | "bitbucket" | "composer" | "deb" | "github" | "golang"
172
- | "hex" | "qpkg" | " rpm" => {
171
+ "apk" | "bitbucket" | "composer" | "deb" | "github" | "golang" | "hex" | "qpkg"
172
+ | "rpm" => {
173
173
n = to_lowercase ( n) ;
174
174
}
175
175
_ => { }
You can’t perform that action at this time.
0 commit comments