Skip to content

Commit

Permalink
🧹 Prefer isEmpty to equality check
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-araman committed Apr 27, 2021
1 parent 2cf5ce3 commit 65b3763
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/MasKit/Commands/SignIn.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public struct SignInCommand: CommandProtocol {
printInfo("Signing in to Apple ID: \(options.username)")

let password: String = {
if options.password == "", !options.dialog {
if options.password.isEmpty, !options.dialog {
return String(validatingUTF8: getpass("Password: "))!
}
return options.password
Expand Down
2 changes: 1 addition & 1 deletion Sources/MasKit/Models/SoftwareProduct.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extension SoftwareProduct {

/// Returns bundleIdentifier if appName is empty string.
var appNameOrBundleIdentifier: String {
appName == "" ? bundleIdentifier : appName
appName.isEmpty ? bundleIdentifier : appName
}

func isOutdatedWhenComparedTo(_ storeApp: SearchResult) -> Bool {
Expand Down

0 comments on commit 65b3763

Please sign in to comment.