diff --git a/Examples/Example-iOS/InsertionSortViewController.swift b/Examples/Example-iOS/InsertionSortViewController.swift index 9b5855f..08f7203 100644 --- a/Examples/Example-iOS/InsertionSortViewController.swift +++ b/Examples/Example-iOS/InsertionSortViewController.swift @@ -107,7 +107,7 @@ final class InsertionSortViewController: UIViewController { } func randmize(animated: Bool) { - let snapshot = DiffableDataSourceSnapshot() + var snapshot = DiffableDataSourceSnapshot() let rows = Int(collectionView.bounds.height / nodeSize.height) - 1 let columns = Int(collectionView.bounds.width / nodeSize.width) @@ -126,7 +126,7 @@ final class InsertionSortViewController: UIViewController { } var isNextSortRequired = false - let snapshot = dataSource.snapshot() + var snapshot = dataSource.snapshot() for section in snapshot.sectionIdentifiers where !section.isSorted { section.sortNext() diff --git a/Examples/Example-iOS/MountainsViewController.swift b/Examples/Example-iOS/MountainsViewController.swift index a0e8150..5806939 100644 --- a/Examples/Example-iOS/MountainsViewController.swift +++ b/Examples/Example-iOS/MountainsViewController.swift @@ -50,7 +50,7 @@ final class MountainsViewController: UIViewController { .filter { $0.contains(filter) } .sorted { $0.name < $1.name } - let snapshot = DiffableDataSourceSnapshot() + var snapshot = DiffableDataSourceSnapshot() snapshot.appendSections([.main]) snapshot.appendItems(mountains) dataSource.apply(snapshot) diff --git a/Examples/Example-iOS/TopViewController.swift b/Examples/Example-iOS/TopViewController.swift index c0c067f..d983261 100644 --- a/Examples/Example-iOS/TopViewController.swift +++ b/Examples/Example-iOS/TopViewController.swift @@ -42,7 +42,7 @@ final class TopViewController: UIViewController { } func reset() { - let snapshot = DiffableDataSourceSnapshot() + var snapshot = DiffableDataSourceSnapshot() snapshot.appendSections([.main]) snapshot.appendItems([.mountains, .insertionSort]) dataSource.apply(snapshot)