mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-01 09:50:16 +00:00
Use resultSet.compactMap.
This commit is contained in:
1 parent
f3ea3e496a
commit
8cf466028a
1 file changed
+1
-8
@@ -32,14 +32,7 @@ struct ErrorLogTable {
|
||||
guard let resultSet = database.executeQuery(sql, withArgumentsIn: nil) else {
|
||||
return []
|
||||
}
|
||||
|
||||
var entries = [ErrorLogEntry]()
|
||||
while resultSet.next() {
|
||||
if let entry = entryWithRow(resultSet) {
|
||||
entries.append(entry)
|
||||
}
|
||||
}
|
||||
return entries
|
||||
return resultSet.compactMap(entryWithRow)
|
||||
}
|
||||
|
||||
static func pruneEntries(limit: Int, database: FMDatabase) {
|
||||
|
||||
Reference in new issue
Block a user