-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the project compile with Swift 5
- Loading branch information
1 parent
e5d49a1
commit 1a8772d
Showing
6 changed files
with
12 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,7 +98,7 @@ extension MutableChangesetContainerProtocol { | |
} | ||
} | ||
|
||
extension ChangesetContainerProtocol where Changeset.Collection: Collection { | ||
This comment has been minimized.
Sorry, something went wrong.
srdanrasic
Author
Contributor
|
||
extension ChangesetContainerProtocol where Changeset.Collection: Swift.Collection { | ||
|
||
/// Returns `true` if underlying collection is empty, `false` otherwise. | ||
public var isEmpty: Bool { | ||
|
@@ -118,7 +118,7 @@ extension ChangesetContainerProtocol where Changeset.Collection: Collection { | |
} | ||
} | ||
|
||
extension ChangesetContainerProtocol where Changeset.Collection: Collection, Changeset.Collection.Index == Int { | ||
extension ChangesetContainerProtocol where Changeset.Collection: Swift.Collection, Changeset.Collection.Index == Int { | ||
|
||
/// Underlying array. | ||
public var array: Collection { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,8 +145,9 @@ extension OrderedCollectionDiff where Index == IndexPath { | |
return AnyOrderedCollectionOperation.simulate(patch: patch.map { $0.asAnyOrderedCollectionOperation }, on: $0) | ||
} | ||
|
||
let updates = zip(self.updates, updatesInFinalCollection).map { (pair) -> OrderedCollectionOperation<C.ChildNode, C.Index> in | ||
return .update(at: pair.0, newElement: collection[pair.1!]) | ||
This comment has been minimized.
Sorry, something went wrong.
srdanrasic
Author
Contributor
|
||
let zipped = zip(self.updates, updatesInFinalCollection) | ||
let updates = zipped.map { (pair) -> OrderedCollectionOperation<C.ChildNode, C.Index> in | ||
return .update(at: pair.0, newElement: collection[pair.1]) | ||
} | ||
|
||
return updates + patch | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Covariance issue.
subscript(indexPath: Index)
is also defined in one of the ancestry protocols.