Skip to content

Commit 47e0b13

Browse files
committed
Separate range literal out onto separate line.
1 parent 8c7ce23 commit 47e0b13

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Swift2.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,8 @@ p. 451: A few changes in Swift 2 and OS X 10.11 affect the implementation of `Ne
444444
These three changes combine to yield the following implementation of `selectTabAtIndex(_:)`:
445445

446446
func selectTabAtIndex(index: Int) {
447-
assert((0..<childViewControllers.count).contains(index), "index out of range")
447+
let range = 0..<childViewControllers.count
448+
assert(range.contains(index), "index out of range")
448449
for (i, button) in buttons.enumerate() {
449450
button.state = (index == i) ? NSOnState : NSOffState
450451
}

0 commit comments

Comments
 (0)