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