mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-29 04:24:21 +00:00
Fix some compiler warnings with -Xfrontend -warn-concurrency
https://twitter.com/olebegemann/status/1467893554915782668
This commit is contained in:
1 parent
6ec3ebc398
commit
8ed16f4440
6 files changed
+23
-2
No files matched your search
@@ -189,6 +189,10 @@ extension ResultCode {
|
||||
}
|
||||
}
|
||||
|
||||
#if compiler(>=5.5.1)
|
||||
extension ResultCode: Sendable { }
|
||||
#endif
|
||||
|
||||
/// DatabaseError wraps an SQLite error.
|
||||
public struct DatabaseError: Error, CustomStringConvertible, CustomNSError {
|
||||
|
||||
|
||||
@@ -157,6 +157,13 @@ extension DatabaseValue: StatementBinding {
|
||||
}
|
||||
}
|
||||
|
||||
#if compiler(>=5.5.1)
|
||||
// @unchecked due to Foundation.Data not conforming to Sendable
|
||||
// TODO: Remove @unchecked when Foundation has been upgraded
|
||||
extension DatabaseValue.Storage: @unchecked Sendable { }
|
||||
extension DatabaseValue: Sendable { }
|
||||
#endif
|
||||
|
||||
// MARK: - Hashable & Equatable
|
||||
|
||||
// Hashable
|
||||
|
||||
@@ -23,6 +23,7 @@ enum RowDecodingError: Error {
|
||||
@usableFromInline
|
||||
let debugDescription: String
|
||||
|
||||
// TODO: replace with a Sendable copy of row
|
||||
/// The row that could not be decoded
|
||||
let row: Row
|
||||
|
||||
@@ -112,6 +113,11 @@ enum RowDecodingError: Error {
|
||||
}
|
||||
}
|
||||
|
||||
#if compiler(>=5.5.1)
|
||||
extension RowKey: Sendable { }
|
||||
extension RowDecodingError.Context: Sendable { }
|
||||
#endif
|
||||
|
||||
@usableFromInline
|
||||
struct RowDecodingContext {
|
||||
/// The row that is decoded
|
||||
|
||||
@@ -880,3 +880,7 @@ extension StatementArguments {
|
||||
return "[" + (namedValuesDescriptions + valuesDescriptions).joined(separator: ", ") + "]"
|
||||
}
|
||||
}
|
||||
|
||||
#if compiler(>=5.5.1)
|
||||
extension StatementArguments: Sendable { }
|
||||
#endif
|
||||
@@ -251,7 +251,7 @@ public struct DatabaseMigrator {
|
||||
/// - throws: An eventual error thrown by the registered migration blocks.
|
||||
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
|
||||
public func migrate(_ writer: DatabaseWriter, upTo targetIdentifier: String) async throws {
|
||||
try await writer.barrierWriteWithoutTransaction { db in
|
||||
try await writer.barrierWriteWithoutTransaction { [self] db in
|
||||
try migrate(db, upTo: targetIdentifier)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,7 +493,7 @@ extension ColumnDecoder: SingleValueDecodingContainer {
|
||||
}
|
||||
|
||||
@available(macOS 10.12, watchOS 3.0, tvOS 10.0, *)
|
||||
private var iso8601Formatter: ISO8601DateFormatter = {
|
||||
private let iso8601Formatter: ISO8601DateFormatter = {
|
||||
let formatter = ISO8601DateFormatter()
|
||||
formatter.formatOptions = .withInternetDateTime
|
||||
return formatter
|
||||
|
||||
Reference in new issue
Block a user