Skip to content

Commit

Permalink
Merge pull request #23 from missingems/feature/make-ScryfallClient-Se…
Browse files Browse the repository at this point in the history
…ndable

Make ScryfallClient Sendable
  • Loading branch information
JacobHearst authored Aug 7, 2024
2 parents bbbb3fd + 02740e3 commit 3e81be0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Sources/ScryfallKit/Networking/NetworkService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public enum NetworkLogLevel: Sendable {
case verbose
}

protocol NetworkServiceProtocol {
protocol NetworkServiceProtocol: Sendable {
func request<T: Decodable>(_ request: EndpointRequest, as type: T.Type, completion: @Sendable @escaping (Result<T, Error>) -> Void)
@available(macOS 10.15.0, *, iOS 13.0.0, *)
func request<T: Decodable>(_ request: EndpointRequest, as type: T.Type) async throws -> T
Expand Down
6 changes: 3 additions & 3 deletions Sources/ScryfallKit/ScryfallClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import Foundation

/// A client for interacting with the Scryfall API
public final class ScryfallClient {
private var networkLogLevel: NetworkLogLevel
var networkService: NetworkServiceProtocol
public final class ScryfallClient: Sendable {
private let networkLogLevel: NetworkLogLevel
let networkService: NetworkServiceProtocol

/// Initialize an instance of the ScryfallClient
/// - Parameter networkLogLevel: The desired logging level. See ``NetworkLogLevel``
Expand Down

0 comments on commit 3e81be0

Please sign in to comment.