Skip to content

Commit f91a8fc

Browse files
committed
Remove duplicated code from isOK
1 parent cef6655 commit f91a8fc

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Sources/SwiftSQL/SQLConnection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public final class SQLConnection {
111111
// MARK: Private
112112

113113
@discardableResult
114-
private func isOK(_ code: Int32) throws -> Int32 {
114+
func isOK(_ code: Int32) throws -> Int32 {
115115
guard let error = SQLError(code: code, db: ref) else { return code }
116116
throw error
117117
}

Sources/SwiftSQL/SQLStatement.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ public final class SQLStatement {
217217

218218
@discardableResult
219219
private func isOK(_ code: Int32) throws -> Int32 {
220-
guard let error = SQLError(code: code, db: db.ref) else { return code }
221-
throw error
220+
try db.isOK(code)
222221
}
223222
}

0 commit comments

Comments
 (0)