@@ -33,7 +33,7 @@ final class WALSnapshot: @unchecked Sendable {
3333 // @unchecked because sqlite3_snapshot has no threading requirements.
3434 // <https://www.sqlite.org/c3ref/snapshot.html>
3535 let sqliteSnapshot : UnsafeMutablePointer < sqlite3_snapshot >
36-
36+
3737 init ( _ db: Database ) throws {
3838 var sqliteSnapshot : UnsafeMutablePointer < sqlite3_snapshot > ?
3939 let code = withUnsafeMutablePointer ( to: & sqliteSnapshot) {
@@ -55,7 +55,7 @@ final class WALSnapshot: @unchecked Sendable {
5555 // > on a wal mode database with no wal file immediately
5656 // > after it is first opened. At least one transaction must
5757 // > be written to it first.
58-
58+
5959 // Test condition 1:
6060 if sqlite3_get_autocommit ( db. sqliteConnection) != 0 {
6161 throw DatabaseError (
@@ -64,7 +64,7 @@ final class WALSnapshot: @unchecked Sendable {
6464 Can't create snapshot because database is in autocommit mode.
6565 """ )
6666 }
67-
67+
6868 // Test condition 2:
6969 if let journalMode = try ? String . fetchOne ( db, sql: " PRAGMA journal_mode " ) ,
7070 journalMode != " wal "
@@ -75,7 +75,7 @@ final class WALSnapshot: @unchecked Sendable {
7575 Can't create snapshot because database is not in WAL mode.
7676 """ )
7777 }
78-
78+
7979 // Condition 3 can't happen because GRDB only calls this
8080 // initializer from read transactions.
8181 //
@@ -91,11 +91,11 @@ final class WALSnapshot: @unchecked Sendable {
9191 }
9292 self . sqliteSnapshot = sqliteSnapshot
9393 }
94-
94+
9595 deinit {
9696 sqlite3_snapshot_free ( sqliteSnapshot)
9797 }
98-
98+
9999 /// Compares two WAL snapshots.
100100 ///
101101 /// `a.compare(b) < 0` iff a is older than b.
0 commit comments