File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ final class InsertionSortViewController: UIViewController {
107107 }
108108
109109 func randmize( animated: Bool ) {
110- let snapshot = DiffableDataSourceSnapshot < Section , Node > ( )
110+ var snapshot = DiffableDataSourceSnapshot < Section , Node > ( )
111111 let rows = Int ( collectionView. bounds. height / nodeSize. height) - 1
112112 let columns = Int ( collectionView. bounds. width / nodeSize. width)
113113
@@ -126,7 +126,7 @@ final class InsertionSortViewController: UIViewController {
126126 }
127127
128128 var isNextSortRequired = false
129- let snapshot = dataSource. snapshot ( )
129+ var snapshot = dataSource. snapshot ( )
130130
131131 for section in snapshot. sectionIdentifiers where !section. isSorted {
132132 section. sortNext ( )
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ final class MountainsViewController: UIViewController {
5050 . filter { $0. contains ( filter) }
5151 . sorted { $0. name < $1. name }
5252
53- let snapshot = DiffableDataSourceSnapshot < Section , Mountain > ( )
53+ var snapshot = DiffableDataSourceSnapshot < Section , Mountain > ( )
5454 snapshot. appendSections ( [ . main] )
5555 snapshot. appendItems ( mountains)
5656 dataSource. apply ( snapshot)
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ final class TopViewController: UIViewController {
4242 }
4343
4444 func reset( ) {
45- let snapshot = DiffableDataSourceSnapshot < Section , Item > ( )
45+ var snapshot = DiffableDataSourceSnapshot < Section , Item > ( )
4646 snapshot. appendSections ( [ . main] )
4747 snapshot. appendItems ( [ . mountains, . insertionSort] )
4848 dataSource. apply ( snapshot)
You can’t perform that action at this time.
0 commit comments