Skip to content

Commit b5f7003

Browse files
use the convenient computed property isAllowedInSemanticVersionIdentifier when validating build metadata
Co-authored-by: David Rönnqvist <[email protected]>
1 parent 4e2b309 commit b5f7003

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SymbolKit/SymbolGraph/SemanticVersion/SemanticVersion.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ extension SymbolGraph {
5151
throw SymbolGraph.SemanticVersionError.emptyIdentifier(position: .buildMetadata)
5252
}
5353
try buildMetadataIdentifiers.forEach {
54-
guard $0.allSatisfy( { $0.isASCII && ( $0.isLetter || $0.isNumber || $0 == "-" ) } ) else {
54+
guard $0.allSatisfy(\.isAllowedInSemanticVersionIdentifier) else {
5555
throw SymbolGraph.SemanticVersionError.invalidCharacterInIdentifier($0, position: .buildMetadata)
5656
}
5757
}

0 commit comments

Comments
 (0)