Use a loop instead of Map for printing

This commit is contained in:
Andrew Naylor 2015-08-22 19:29:22 +08:00
parent 4ebd0ebb17
commit fd658835e9

View file

@ -15,10 +15,9 @@ struct ListInstalledCommand: CommandType {
case .Arguments:
let softwareMap = CKSoftwareMap.sharedSoftwareMap()
let products = softwareMap.allProducts() as! [CKSoftwareProduct]
products.map({ product -> Bool in
for product in products {
println("\(product.itemIdentifier) \(product.appName)")
return true
})
}
default:
break