Authorization improvements

This commit is contained in:
Ilya Laktyushin
2022-08-24 15:11:06 +02:00
parent 6550313056
commit a28f744eb4
31 changed files with 720 additions and 436 deletions

View File

@@ -38,7 +38,11 @@ private func loadCountryCodes() -> [(String, Int)] {
let countryId = String(data[codeRange.upperBound ..< idRange.lowerBound])
let maybeNameRange = data.range(of: endOfLine, options: [], range: idRange.upperBound ..< data.endIndex)
guard let patternRange = data.range(of: delimiter, options: [], range: idRange.upperBound ..< data.endIndex) else {
break
}
let maybeNameRange = data.range(of: endOfLine, options: [], range: patternRange.upperBound ..< data.endIndex)
if let countryCodeInt = Int(countryCode) {
result.append((countryId, countryCodeInt))