Skip to content

Commit a2c22dd

Browse files
author
Rob Rix
committed
Merge pull request #22 from JaSpa/master
Mark mapping closures `@noescape`
2 parents 18d05a5 + 85e19e8 commit a2c22dd

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

Box/Box.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public final class Box<T>: BoxType, Printable {
2020
public let value: T
2121

2222
/// Constructs a new Box by transforming `value` by `f`.
23-
public func map<U>(f: T -> U) -> Box<U> {
23+
public func map<U>(@noescape f: T -> U) -> Box<U> {
2424
return Box<U>(f(value))
2525
}
2626

Box/BoxType.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ public func != <B: BoxType where B.Value: Equatable> (lhs: B, rhs: B) -> Bool {
4141
// MARK: Map
4242

4343
/// Maps the value of a box into a new box.
44-
public func map<B: BoxType, C: BoxType>(v: B, f: B.Value -> C.Value) -> C {
44+
public func map<B: BoxType, C: BoxType>(v: B, @noescape f: B.Value -> C.Value) -> C {
4545
return C(f(v.value))
4646
}

Box/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.2.0</string>
18+
<string>1.2.1</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

Box/MutableBox.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public final class MutableBox<T>: MutableBoxType, Printable {
1515
public var value: T
1616

1717
/// Constructs a new MutableBox by transforming `value` by `f`.
18-
public func map<U>(f: T -> U) -> MutableBox<U> {
18+
public func map<U>(@noescape f: T -> U) -> MutableBox<U> {
1919
return MutableBox<U>(f(value))
2020
}
2121

0 commit comments

Comments
 (0)