Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler failure in Xcode 11 #22

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/NonEmpty/NonEmpty+Collection.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extension NonEmpty: Collection {
extension NonEmpty {
public enum Index: Comparable {
case head
case tail(C.Index)
Expand Down
2 changes: 1 addition & 1 deletion Sources/NonEmpty/NonEmpty+MutableCollection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extension NonEmpty: MutableCollection where C: MutableCollection {
}

extension NonEmpty where C: MutableCollection, C.Index == Int {
public subscript(position: Int) -> Element {
public subscript(position: C.Index) -> Element {
get {
return self[position == 0 ? .head : .tail(self.tail.startIndex + position - 1)]
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/NonEmpty/NonEmpty.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
public struct NonEmpty<C: Collection> {
public struct NonEmpty<C: Collection>: Collection {
public typealias Element = C.Element

public internal(set) var head: Element
Expand Down