Skip to content

Commit a725aa0

Browse files
miluxctron
authored andcommitted
chore: fix formatting
1 parent 12ea779 commit a725aa0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/purl.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,19 +157,19 @@ impl<'a> PackageUrl<'a> {
157157
N: Into<Cow<'a, str>>,
158158
{
159159
// 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+
_ => {}
166166
}
167167

168168
// Lowercase namespace if needed for this type
169169
let mut n = namespace.into();
170170
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" => {
173173
n = to_lowercase(n);
174174
}
175175
_ => {}

0 commit comments

Comments
 (0)