Skip to content

Commit 896daf7

Browse files
committed
Mark mapping closures @noescape
1 parent 18d05a5 commit 896daf7

3 files changed

Lines changed: 3 additions & 3 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/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)