Skip to content

Commit

Permalink
Use FileDownloadDelegate from the AHC package (#171)
Browse files Browse the repository at this point in the history
`FileDownloadDelegate` was introduced in swift-server/async-http-client#275, which almost directly mirrors the implementation in `carton`. Now that it's available in a released version of AHC, let's delete some code here and replace it with the version from that package.
  • Loading branch information
MaxDesiatov authored Dec 1, 2020
1 parent 1c15282 commit ef402e7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 84 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let package = Package(
name: "carton",
platforms: [.macOS(.v10_15)],
dependencies: [
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.1.1"),
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.2.2"),
.package(
url: "https://github.com/apple/swift-argument-parser.git",
.upToNextMinor(from: "0.3.0")
Expand Down
81 changes: 0 additions & 81 deletions Sources/SwiftToolchain/FileDownloadDelegate.swift

This file was deleted.

4 changes: 2 additions & 2 deletions Sources/SwiftToolchain/ToolchainInstallation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ extension ToolchainSystem {
},
reportProgress: {
subject.send(.init(
step: $1,
total: $0 ?? expectedArchiveSize,
step: $0.receivedBytes,
total: $0.totalBytes ?? expectedArchiveSize,
text: "saving to \(path)"
))
}
Expand Down

0 comments on commit ef402e7

Please sign in to comment.