Skip to content

Commit 1fea119

Browse files
committed
Mark transaction/savepoint block helpers @NoEscape
They execute immediately, so there's no reason to worry about capture semantics. Signed-off-by: Stephen Celis <stephen@stephencelis.com>
1 parent f02b75a commit 1fea119

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SQLite/Database.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public final class Database {
238238
/// failure.
239239
///
240240
/// :returns: The COMMIT or ROLLBACK statement.
241-
public func transaction(_ mode: TransactionMode = .Deferred, _ block: Statement -> TransactionResult) -> Statement {
241+
public func transaction(_ mode: TransactionMode = .Deferred, @noescape _ block: Statement -> TransactionResult) -> Statement {
242242
return run(block(transaction(mode)).rawValue)
243243
}
244244

@@ -312,7 +312,7 @@ public final class Database {
312312
/// depending on success or failure.
313313
///
314314
/// :returns: The RELEASE or ROLLBACK statement.
315-
public func savepoint(_ savepointName: String? = nil, _ block: Statement -> SavepointResult) -> Statement {
315+
public func savepoint(_ savepointName: String? = nil, @noescape _ block: Statement -> SavepointResult) -> Statement {
316316
switch block(savepoint(savepointName)) {
317317
case .Release:
318318
return release()

0 commit comments

Comments
 (0)