Skip to content

Commit 5afa8f1

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

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( { $0.isAllowedInSemanticVersionIdentifier } ) else {
5555
throw SymbolGraph.SemanticVersionError.invalidCharacterInIdentifier($0, position: .buildMetadata)
5656
}
5757
}

0 commit comments

Comments
 (0)