🧹 Lint

This commit is contained in:
Chris Araman 2021-04-21 15:13:38 -07:00
parent 99bd7533b1
commit 55b7615763
No known key found for this signature in database
GPG key ID: BB4499D9E11B61E0
4 changed files with 4 additions and 4 deletions

View file

@ -31,7 +31,7 @@ public struct InstallCommand: CommandProtocol {
/// Runs the command.
public func run(_ options: Options) -> Result<Void, MASError> {
// 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

View file

@ -70,7 +70,7 @@ public struct LuckyCommand: CommandProtocol {
fileprivate func install(_ appId: UInt64, options: Options) -> Result<Void, MASError> {
// 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

View file

@ -30,7 +30,7 @@ public struct PurchaseCommand: CommandProtocol {
/// Runs the command.
public func run(_ options: Options) -> Result<Void, MASError> {
// 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

View file

@ -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