Skip to content

Commit f808059

Browse files
[NFC] assign directly to self the parsed version, instead of calling init(_ version: Version)
1 parent aa1d6f2 commit f808059

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/PackageDescription/Version+StringLiteralConvertible.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ extension Version: ExpressibleByStringLiteral {
1616
/// - version: A string literal to use for creating a new version struct.
1717
public init(stringLiteral value: String) {
1818
if let version = Version(value) {
19-
self.init(version)
19+
self = version
2020
} else {
2121
// If version can't be initialized using the string literal, report
2222
// the error and initialize with a dummy value. This is done to

0 commit comments

Comments
 (0)