mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-27 04:14:21 +00:00
Less TODO
This commit is contained in:
1 parent
d7e0e44de0
commit
e1bb98ec94
1 file changed
+3
-4
@@ -128,13 +128,12 @@ extension DatabaseReader {
|
||||
try read { dbFrom in
|
||||
try writer.write { dbDest in
|
||||
let backup = sqlite3_backup_init(dbDest.sqliteConnection, "main", dbFrom.sqliteConnection, "main")
|
||||
// TODO: use the future Int <-> Pointer APIs https://github.com/apple/swift-evolution/blob/master/proposals/0016-initializers-for-converting-unsafe-pointers-to-ints.md
|
||||
guard backup != unsafeBitCast(Int(SQLITE_ERROR), COpaquePointer.self) else {
|
||||
throw DatabaseError(code: SQLITE_ERROR)
|
||||
}
|
||||
guard backup != nil else {
|
||||
throw DatabaseError(code: dbDest.lastErrorCode, message: dbDest.lastErrorMessage)
|
||||
}
|
||||
guard backup != unsafeBitCast(Int(SQLITE_ERROR), COpaquePointer.self) else {
|
||||
throw DatabaseError(code: SQLITE_ERROR)
|
||||
}
|
||||
|
||||
afterBackupInit?()
|
||||
|
||||
|
||||
Reference in new issue
Block a user