@@ -169,7 +169,7 @@ public final class Database: CustomStringConvertible, CustomDebugStringConvertib
169169 /// connection has been opened is an SQLite misuse, and has no effect.
170170 ///
171171 /// Related SQLite documentation: <https://www.sqlite.org/errlog.html>
172- nonisolated ( unsafe) public static var logError : LogErrorFunction ? = nil {
172+ nonisolated ( unsafe) public static var logError : LogErrorFunction ? {
173173 didSet {
174174 if logError != nil {
175175 _registerErrorLogCallback { ( _, code, message) in
@@ -459,7 +459,7 @@ public final class Database: CustomStringConvertible, CustomDebugStringConvertib
459459
460460 private static func openConnection( path: String , flags: CInt ) throws -> SQLiteConnection {
461461 // See <https://www.sqlite.org/c3ref/open.html>
462- var sqliteConnection : SQLiteConnection ? = nil
462+ var sqliteConnection : SQLiteConnection ?
463463 let code = sqlite3_open_v2 ( path, & sqliteConnection, flags, nil )
464464 guard code == SQLITE_OK else {
465465 // https://www.sqlite.org/c3ref/open.html
@@ -1286,7 +1286,7 @@ public final class Database: CustomStringConvertible, CustomDebugStringConvertib
12861286
12871287 // Don't return String.fetchOne(self, sql: "PRAGMA journal_mode"), so
12881288 // that we don't create an infinite loop in checkForSuspensionViolation(from:)
1289- var statement : SQLiteStatement ? = nil
1289+ var statement : SQLiteStatement ?
12901290 let sql = " PRAGMA journal_mode "
12911291 sqlite3_prepare_v2 ( sqliteConnection, sql, - 1 , & statement, nil )
12921292 defer { sqlite3_finalize ( statement) }
@@ -1483,7 +1483,7 @@ public final class Database: CustomStringConvertible, CustomDebugStringConvertib
14831483 // Now that transaction has begun, we'll rollback in case of error.
14841484 // But we'll throw the first caught error, so that user knows
14851485 // what happened.
1486- var firstError : Error ? = nil
1486+ var firstError : Error ?
14871487 let needsRollback : Bool
14881488 do {
14891489 let completion = try operations ( )
@@ -1626,7 +1626,7 @@ public final class Database: CustomStringConvertible, CustomDebugStringConvertib
16261626 // Now that savepoint has begun, we'll rollback in case of error.
16271627 // But we'll throw the first caught error, so that user knows
16281628 // what happened.
1629- var firstError : Error ? = nil
1629+ var firstError : Error ?
16301630 let needsRollback : Bool
16311631 do {
16321632 let completion = try operations ( )
0 commit comments