Skip to content

Commit 97a535f

Browse files
committed
Remove Unused Combine
Remove unused combine dependency
1 parent d363e83 commit 97a535f

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

Sources/Hub/Downloader.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66
// See LICENSE at https://github.com/huggingface/swift-coreml-diffusers/LICENSE
77
//
88

9-
import Combine
109
import Foundation
1110

1211
/// A robust file downloader with support for resumable downloads and progress reporting.
1312
///
1413
/// The Downloader class handles file downloads from remote URLs with features including
1514
/// automatic resume capability, progress tracking, speed monitoring, and retry mechanisms.
1615
/// It supports both foreground and background download sessions for different use cases.
17-
final class Downloader: NSObject, Sendable, ObservableObject {
16+
final class Downloader: NSObject, Sendable {
1817
private let destination: URL
1918
private let incompleteDestination: URL
2019
private let downloadResumeState: DownloadResumeState = .init()

Sources/Hub/HubApi.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,9 +491,8 @@ public extension HubApi {
491491
}
492492
}
493493

494-
/// Note we go from Combine in Downloader to callback-based progress reporting
495-
/// We'll probably need to support Combine as well to play well with Swift UI
496-
/// (See for example PipelineLoader in swift-coreml-diffusers)
494+
/// Downloader emits progress over AsyncStream which we bridge here to a simple callback.
495+
/// A Combine wrapper can be layered on top when needed for SwiftUI-style progress reporting.
497496
@discardableResult
498497
func download(progressHandler: @escaping (Double, Double?) -> Void) async throws -> URL {
499498
let localMetadata = try hub.readDownloadMetadata(metadataPath: metadataDestination)

Tests/HubTests/DownloaderTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// Created by Arda Atahan Ibis on 1/28/25.
66
//
77

8-
import Combine
98
import XCTest
109

1110
@testable import Hub

0 commit comments

Comments
 (0)