File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -130,10 +130,8 @@ extension SwiftPackage.VersionRequirement: JSONUtilities.JSONObjectConvertible {
130130 self = . revision( revision)
131131 } else if let branch = json ( atKeyPath: " branch " ) {
132132 self = . branch( branch)
133- } else if jsonDictionary [ " minVersion " ] != nil && jsonDictionary [ " maxVersion " ] != nil {
134- let minimum : String = try jsonDictionary. json ( atKeyPath: " minVersion " )
135- let maximum : String = try jsonDictionary. json ( atKeyPath: " maxVersion " )
136- self = . range( from: minimum, to: maximum)
133+ } else if let minVersion = json ( atKeyPath: " minVersion " ) , let maxVersion = json ( atKeyPath: " maxVersion " ) {
134+ self = . range( from: minVersion, to: maxVersion)
137135 } else if let minorVersion = json ( atKeyPath: " minorVersion " ) {
138136 self = . upToNextMinorVersion( minorVersion)
139137 } else if let majorVersion = json ( atKeyPath: " majorVersion " ) {
You can’t perform that action at this time.
0 commit comments