Skip to content

Commit c968204

Browse files
committed
Merge pull request #2173 from practicalswift/arrows-second-try
2 parents 00d8635 + dc6c2ae commit c968204

File tree

15 files changed

+22
-22
lines changed

15 files changed

+22
-22
lines changed

benchmark/single-source/CaptureProp.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func sum(_ x:Int, y:Int) -> Int {
1717
@inline(never)
1818
func benchCaptureProp<S : Sequence
1919
>(
20-
_ s: S, _ f:(S.Iterator.Element, S.Iterator.Element)->S.Iterator.Element) -> S.Iterator.Element {
20+
_ s: S, _ f: (S.Iterator.Element, S.Iterator.Element) -> S.Iterator.Element) -> S.Iterator.Element {
2121

2222
var it = s.makeIterator()
2323
let initial = it.next()!

benchmark/single-source/Integrate.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ import TestsUtils
1818
class Integrate {
1919
static let epsilon = 1.0e-9;
2020

21-
let fun:(Double)->Double;
21+
let fun: (Double) -> Double;
2222

23-
init (f:(Double)->Double) {
23+
init (f: (Double) -> Double) {
2424
fun = f;
2525
}
2626

27-
private func recEval(_ l:Double, fl:Double, r:Double, fr:Double, a:Double)->Double {
27+
private func recEval(_ l: Double, fl: Double, r: Double, fr: Double, a: Double) -> Double {
2828
let h = (r - l) / 2
2929
let hh = h / 2
3030
let c = l + h
@@ -43,7 +43,7 @@ class Integrate {
4343
}
4444

4545
@inline(never)
46-
func computeArea(_ left: Double, right:Double)->Double {
46+
func computeArea(_ left: Double, right: Double) -> Double {
4747
return recEval(left, fl:fun(left), r:right, fr:fun(right), a:0)
4848
}
4949
}

benchmark/single-source/Prims.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ extension Edge : Hashable {
183183
}
184184
}
185185

186-
func Prims(_ graph : Array<GraphNode>, _ fun : (Int, Int)->Double) -> Array<Int?> {
186+
func Prims(_ graph : Array<GraphNode>, _ fun : (Int, Int) -> Double) -> Array<Int?> {
187187
var treeEdges = Array<Int?>(repeating:nil, count:graph.count)
188188

189189
let queue = PriorityQueue(Num:graph.count)

benchmark/utils/DriverUtils.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,18 @@ extension BenchResults : CustomStringConvertible {
4848
struct Test {
4949
let name: String
5050
let index: Int
51-
let f: (Int)->()
51+
let f: (Int) -> ()
5252
var run: Bool
53-
init(name: String, n: Int, f: (Int)->()) {
53+
init(name: String, n: Int, f: (Int) -> ()) {
5454
self.name = name
5555
self.index = n
5656
self.f = f
5757
run = true
5858
}
5959
}
6060

61-
public var precommitTests: [String : (Int)->()] = [:]
62-
public var otherTests: [String : (Int)->()] = [:]
61+
public var precommitTests: [String : (Int) -> ()] = [:]
62+
public var otherTests: [String : (Int) -> ()] = [:]
6363

6464
enum TestAction {
6565
case Run

stdlib/private/StdlibUnittest/StdlibUnittest.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public func expectNotEqual<T : Equatable>(_ expected: T, _ actual: T, ${TRACE})
182182
}
183183

184184
// Cannot write a sane set of overloads using generics because of:
185-
// <rdar://problem/17015923> Array->NSArray implicit conversion insanity
185+
// <rdar://problem/17015923> Array -> NSArray implicit conversion insanity
186186
public func expectOptionalEqual<T : Equatable>(
187187
_ expected: T, _ actual: T?, ${TRACE}
188188
) {

stdlib/public/core/Print.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public func print(
3131
#if os(Windows)
3232
// FIXME: This fix is for 'crash at hook(output.left)' in cygwin.
3333
// Proper fix is needed. see: https://bugs.swift.org/browse/SR-612
34-
let _playgroundPrintHook: ((String)->Void)? = nil
34+
let _playgroundPrintHook: ((String) -> Void)? = nil
3535
#endif
3636
if let hook = _playgroundPrintHook {
3737
var output = _TeeStream(left: "", right: _Stdout())

test/1_stdlib/NewArray.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func test<
144144
checkEqual(x, y, false)
145145

146146
func checkReallocations(
147-
_ a: T, _ growthDescription: String, _ growBy1: (_: inout T)->()
147+
_ a: T, _ growthDescription: String, _ growBy1: (_: inout T) -> ()
148148
) {
149149
var a = a
150150
var reallocations = 0

test/1_stdlib/Tuple.swift.gyb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var TupleTestSuite = TestSuite("Tuple")
2020
func testEquality<A : Equatable, B : Equatable, C : Equatable>(
2121
_ lhs: (A, B, C), equal: Bool, to rhs: (A, B, C),
2222
//===--- TRACE boilerplate ----------------------------------------------===//
23-
@autoclosure _ message: ()->String = "",
23+
@autoclosure _ message: () -> String = "",
2424
showFrame: Bool = true,
2525
stackTrace: SourceLocStack = SourceLocStack(),
2626
file: String = #file, line: UInt = #line
@@ -94,7 +94,7 @@ enum Ordering : Equatable {
9494
func testOrdering<A : Comparable, B : Comparable, C : Comparable>(
9595
_ lhs: (A, B, C), _ ordering: Ordering, _ rhs: (A, B, C),
9696
//===--- TRACE boilerplate ----------------------------------------------===//
97-
@autoclosure _ message: ()->String = "",
97+
@autoclosure _ message: () -> String = "",
9898
showFrame: Bool = true,
9999
stackTrace: SourceLocStack = SourceLocStack(),
100100
file: String = #file, line: UInt = #line

test/Constraints/diagnostics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public func myMap<C : Collection, T>(
147147
}
148148

149149
@available(*, unavailable, message: "call the 'map()' method on the optional value")
150-
public func myMap<T, U>(_ x: T?, @noescape _ f: (T)->U) -> U? {
150+
public func myMap<T, U>(_ x: T?, @noescape _ f: (T) -> U) -> U? {
151151
fatalError("unavailable function can't be called")
152152
}
153153

test/Prototypes/CollectionsMoveIndices.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@
324324
// a small number of commonly used algorithms that require that
325325
// property, and they can be provided as methods on the collection,
326326
// for example removeAll(in: Range<Index>) and
327-
// removeAll(_: (Element)->Bool).
327+
// removeAll(_: (Element) -> Bool).
328328
//
329329
// If we were to allow reference-counted indices (basically, the
330330
// current collections model), then an additional design is possible

0 commit comments

Comments
 (0)