diff --git a/Sources/MasKit/Formatters/SearchResultFormatter.swift b/Sources/MasKit/Formatters/SearchResultFormatter.swift index 3d0c7d2..568ea94 100644 --- a/Sources/MasKit/Formatters/SearchResultFormatter.swift +++ b/Sources/MasKit/Formatters/SearchResultFormatter.swift @@ -16,10 +16,7 @@ struct SearchResultFormatter { /// - Returns: Multiliune text outoutp. static func format(results: [SearchResult], includePrice: Bool = false) -> String { // find longest appName for formatting, default 50 - let maxLength = - results.map(\.trackName).max(by: { $1.count > $0.count })?.count - ?? 50 - + let maxLength = results.map(\.trackName.count).max() ?? 50 var output: String = "" for result in results {