mirror of
https://github.com/mas-cli/mas
synced 2025-02-16 12:38:30 +00:00
♻️ Simplify max identifier length calculation
This commit is contained in:
parent
f0bf27a821
commit
0a506b1ebe
1 changed files with 1 additions and 5 deletions
|
@ -19,11 +19,7 @@ struct AppListFormatter {
|
|||
/// - Returns: Multiliune text outoutp.
|
||||
static func format(products: [SoftwareProduct]) -> String {
|
||||
// find longest appName for formatting, default 50
|
||||
let maxLength =
|
||||
products.map(\.appNameOrBbundleIdentifier)
|
||||
.max(by: { $1.count > $0.count })?
|
||||
.count
|
||||
?? nameColumnMinWidth
|
||||
let maxLength = products.map(\.appNameOrBbundleIdentifier.count).max() ?? nameColumnMinWidth
|
||||
|
||||
var output: String = ""
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue