Skip to content

Commit b28aa23

Browse files
committed
refactor: replace _read and _modify with the new yielding accessors
https://github.com/swiftlang/swift-evolution/blob/main/proposals/0474-yi elding-accessors.md
1 parent e9aba83 commit b28aa23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/GameOfLife/CellularAutomaton.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public struct CellularAutomaton {
150150
/// Accesses the cell at the specified position.
151151
@inlinable
152152
public subscript(x: Int, y: Int) -> Bool {
153-
_read { yield self.map[y][x] }
154-
_modify { yield &self.map[y][x] }
153+
yielding borrow { yield self.map[y][x] }
154+
yielding mutate { yield &self.map[y][x] }
155155
}
156156
}

0 commit comments

Comments
 (0)