Remove some unused code

This commit is contained in:
Matt Kiazyk 2021-01-01 13:01:07 -06:00
parent 72bdadb796
commit 7d1e22e668
No known key found for this signature in database
GPG key ID: 967DBC53389132D7

View file

@ -209,10 +209,6 @@ class AppState: ObservableObject {
// MARK: - Uninstall
func uninstall(id: Xcode.ID) {
if helperInstallState == .notInstalled {
installHelper()
}
guard
let installedXcode = Current.files.installedXcodes(Path.root/"Applications").first(where: { $0.version == id }),
uninstallPublisher == nil
@ -318,8 +314,6 @@ class AppState: ObservableObject {
private func uninstallXcode(path: Path) -> AnyPublisher<Void, Error> {
let connectionErrorSubject = PassthroughSubject<String, Error>()
return Deferred {
Future { promise in
do {
@ -330,13 +324,6 @@ class AppState: ObservableObject {
}
}
}
// Take values, but fail when connectionErrorSubject fails
.zip(
connectionErrorSubject
.prepend("")
.map { _ in Void() }
)
.map { $0.0 }
.eraseToAnyPublisher()
}