Skip to content

Commit e4ca272

Browse files
authored
fix: Storage methods return Sendable (#206)
* refactor: Improve async methods to remove warnings * nit * Fix additional warning * fix: Atorage methods return Sendable * revert
1 parent 18a7f9c commit e4ca272

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/ParseSwift/Storage/ParseStorage.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ extension ParseStorage {
5252
return try await backingStore.deleteAll()
5353
}
5454

55-
func get<T>(valueFor key: String) async throws -> T? where T: Decodable {
55+
func get<T>(valueFor key: String) async throws -> T? where T: Decodable & Sendable {
5656
try requireBackingStore()
5757
return try await backingStore.get(valueFor: key)
5858
}
5959

60-
func set<T>(_ object: T, for key: String) async throws where T: Encodable {
60+
func set<T>(_ object: T, for key: String) async throws where T: Encodable & Sendable {
6161
try requireBackingStore()
6262
return try await backingStore.set(object, for: key)
6363
}

0 commit comments

Comments
 (0)