mirror of
https://github.com/GayPizzaSpecifications/darwin-apk.git
synced 2025-08-03 13:31:32 +00:00
More efficient empty line check
This commit is contained in:
@ -15,7 +15,7 @@ struct ApkRawIndex {
|
||||
recordLines.reserveCapacity(15)
|
||||
|
||||
for line in lines {
|
||||
if line.trimmingCharacters(in: .whitespaces).isEmpty {
|
||||
if line.isEmpty || line.allSatisfy(\.isWhitespace) {
|
||||
if !recordLines.isEmpty {
|
||||
packages.append(try .init(parsingEntryLines: recordLines))
|
||||
recordLines.removeAll(keepingCapacity: true)
|
||||
|
Reference in New Issue
Block a user