mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-26 04:07:50 +00:00
Async database accesses are no longer escaping and no longer need to capture self
This commit is contained in:
1 parent
c666393e63
commit
c91c183354
1 file changed
+1
-1
@@ -130,7 +130,7 @@ extension AppDatabase {
|
||||
|
||||
/// Refresh all players (by performing some random changes, for demo purpose).
|
||||
func refreshPlayers() async throws {
|
||||
try await dbWriter.write { [self] db in
|
||||
try await dbWriter.write { db in
|
||||
if try Player.all().isEmpty(db) {
|
||||
// When database is empty, insert new random players
|
||||
try createRandomPlayers(db)
|
||||
|
||||
Reference in new issue
Block a user