From ecba9e8608320ba5b66bd6d210a52413bb57c138 Mon Sep 17 00:00:00 2001 From: Chris Araman Date: Wed, 21 Apr 2021 15:13:38 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Lint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MasKit/Commands/Install.swift | 2 +- MasKit/Commands/Lucky.swift | 2 +- MasKit/Commands/Purchase.swift | 2 +- MasKitTests/Controllers/AppLibraryMock.swift | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MasKit/Commands/Install.swift b/MasKit/Commands/Install.swift index 92e6968..cbfcfaa 100644 --- a/MasKit/Commands/Install.swift +++ b/MasKit/Commands/Install.swift @@ -31,7 +31,7 @@ public struct InstallCommand: CommandProtocol { /// Runs the command. public func run(_ options: Options) -> Result { // Try to download applications with given identifiers and collect results - let downloadResults = options.appIds.compactMap { (appId) -> MASError? in + let downloadResults = options.appIds.compactMap { appId -> MASError? in if let product = appLibrary.installedApp(forId: appId), !options.forceInstall { printWarning("\(product.appName) is already installed") return nil diff --git a/MasKit/Commands/Lucky.swift b/MasKit/Commands/Lucky.swift index 520ac86..4c9f4f0 100644 --- a/MasKit/Commands/Lucky.swift +++ b/MasKit/Commands/Lucky.swift @@ -70,7 +70,7 @@ public struct LuckyCommand: CommandProtocol { fileprivate func install(_ appId: UInt64, options: Options) -> Result { // Try to download applications with given identifiers and collect results let downloadResults = [appId] - .compactMap { (appId) -> MASError? in + .compactMap { appId -> MASError? in if let product = appLibrary.installedApp(forId: appId), !options.forceInstall { printWarning("\(product.appName) is already installed") return nil diff --git a/MasKit/Commands/Purchase.swift b/MasKit/Commands/Purchase.swift index 40b80ae..f9ea5dc 100644 --- a/MasKit/Commands/Purchase.swift +++ b/MasKit/Commands/Purchase.swift @@ -30,7 +30,7 @@ public struct PurchaseCommand: CommandProtocol { /// Runs the command. public func run(_ options: Options) -> Result { // Try to download applications with given identifiers and collect results - let downloadResults = options.appIds.compactMap { (appId) -> MASError? in + let downloadResults = options.appIds.compactMap { appId -> MASError? in if let product = appLibrary.installedApp(forId: appId) { printWarning("\(product.appName) has already been purchased.") return nil diff --git a/MasKitTests/Controllers/AppLibraryMock.swift b/MasKitTests/Controllers/AppLibraryMock.swift index 61d70c4..1c250b4 100644 --- a/MasKitTests/Controllers/AppLibraryMock.swift +++ b/MasKitTests/Controllers/AppLibraryMock.swift @@ -20,7 +20,7 @@ class AppLibraryMock: AppLibrary { } func uninstallApp(app: SoftwareProduct) throws { - if !installedApps.contains(where: { (product) -> Bool in + if !installedApps.contains(where: { product -> Bool in app.itemIdentifier == product.itemIdentifier }) { throw MASError.notInstalled