Skip to content

Commit b98b160

Browse files
committed
Revert "Add an extension method to CollectionType"
This reverts commit 3ead6f5.
1 parent 3ead6f5 commit b98b160

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

ReactiveTask/Task.swift

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,17 @@ public struct Task {
4646
}
4747
}
4848

49-
private extension CollectionType where Generator.Element == String {
50-
func escaped() -> [String] {
49+
extension Task: CustomStringConvertible {
50+
public var description: String {
5151
let whitespaceCharacterSet = NSCharacterSet.whitespaceCharacterSet()
52-
return map { string -> String in
53-
if string.rangeOfCharacterFromSet(whitespaceCharacterSet) != nil {
54-
return "\"\(string)\""
52+
let arguments = self.arguments.map { argument -> String in
53+
if argument.rangeOfCharacterFromSet(whitespaceCharacterSet) != nil {
54+
return "\"\(argument)\""
5555
} else {
56-
return string
56+
return argument
5757
}
5858
}
59-
}
60-
}
61-
62-
extension Task: CustomStringConvertible {
63-
public var description: String {
64-
return "\(launchPath) \(arguments.escaped().joinWithSeparator(" "))"
59+
return "\(launchPath) \(arguments.joinWithSeparator(" "))"
6560
}
6661
}
6762

0 commit comments

Comments
 (0)