From 692f448b4679a8e2b7dfda9a99077ee3bad07d41 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Fri, 1 Apr 2022 14:44:21 +0300 Subject: [PATCH] fix: remove TIFoundationUtils imports from TIMoyaNetworking --- .../NetworkService/Cancellables/BaseCancellable.swift | 3 +-- .../Sources/NetworkService/Cancellables/Cancellables.swift | 5 ----- .../Sources/NetworkService/Cancellables/NonCancellable.swift | 5 +++-- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/TIMoyaNetworking/Sources/NetworkService/Cancellables/BaseCancellable.swift b/TIMoyaNetworking/Sources/NetworkService/Cancellables/BaseCancellable.swift index 05e2e690..883d0db3 100644 --- a/TIMoyaNetworking/Sources/NetworkService/Cancellables/BaseCancellable.swift +++ b/TIMoyaNetworking/Sources/NetworkService/Cancellables/BaseCancellable.swift @@ -21,9 +21,8 @@ // import Moya -import TIFoundationUtils -open class BaseCancellable: Cancellable, CancellableTask { +open class BaseCancellable: Cancellable { private(set) public var isCancelled = false open func cancel() { diff --git a/TIMoyaNetworking/Sources/NetworkService/Cancellables/Cancellables.swift b/TIMoyaNetworking/Sources/NetworkService/Cancellables/Cancellables.swift index 87955661..a9f65d2b 100644 --- a/TIMoyaNetworking/Sources/NetworkService/Cancellables/Cancellables.swift +++ b/TIMoyaNetworking/Sources/NetworkService/Cancellables/Cancellables.swift @@ -22,7 +22,6 @@ import Moya import TISwiftUtils -import TIFoundationUtils public struct Cancellables { public static func nonCancellable() -> Cancellable { @@ -32,8 +31,4 @@ public struct Cancellables { public static func scoped(scopeCancellableClosure: ScopeCancellable.ScopeCancellableClosure) -> Cancellable { ScopeCancellable(scopeCancellableClosure: scopeCancellableClosure) } - - public static func nonCancellableTask() -> CancellableTask { - NonCancellable() - } } diff --git a/TIMoyaNetworking/Sources/NetworkService/Cancellables/NonCancellable.swift b/TIMoyaNetworking/Sources/NetworkService/Cancellables/NonCancellable.swift index 0d3c457a..7af2d062 100644 --- a/TIMoyaNetworking/Sources/NetworkService/Cancellables/NonCancellable.swift +++ b/TIMoyaNetworking/Sources/NetworkService/Cancellables/NonCancellable.swift @@ -21,11 +21,12 @@ // import Moya -import TIFoundationUtils -public struct NonCancellable: Cancellable, CancellableTask { +public struct NonCancellable: Cancellable { public let isCancelled = true + public init() {} + public func cancel() { // nothing }