From 0d2f589553bc8097e0252f221be1af26959b90f8 Mon Sep 17 00:00:00 2001 From: Roman Schlagowsky Date: Wed, 21 Aug 2024 13:57:57 +0200 Subject: [PATCH] Fix tests --- Sources/StreamDeckKit/Session/InternalStreamDeckSession.swift | 2 +- Tests/StreamDeckSDKTests/Helper/StreamDeckClientMock.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/StreamDeckKit/Session/InternalStreamDeckSession.swift b/Sources/StreamDeckKit/Session/InternalStreamDeckSession.swift index 6554da9d..03a16c68 100644 --- a/Sources/StreamDeckKit/Session/InternalStreamDeckSession.swift +++ b/Sources/StreamDeckKit/Session/InternalStreamDeckSession.swift @@ -167,7 +167,7 @@ final actor InternalStreamDeckSession { devicesByService[service] = device client.setErrorHandler { [weak self] error in - if case let .disconnected = error, let self = self { + if case .disconnected = error, let self = self { Task { await self.stop() } } } diff --git a/Tests/StreamDeckSDKTests/Helper/StreamDeckClientMock.swift b/Tests/StreamDeckSDKTests/Helper/StreamDeckClientMock.swift index c67c8beb..efab5b1d 100644 --- a/Tests/StreamDeckSDKTests/Helper/StreamDeckClientMock.swift +++ b/Tests/StreamDeckSDKTests/Helper/StreamDeckClientMock.swift @@ -153,7 +153,7 @@ extension StreamDeckClientMock: StreamDeckClientProtocol { subscribedToInputEventsSubject.send(true) } - func setErrorHandler(_ handler: @escaping ClientErrorHandler) {} + public func setErrorHandler(_ handler: @escaping ClientErrorHandler) {} public func setBrightness(_ brightness: Int) { lock.lock(); defer { lock.unlock() }