Skip to content

Commit 2ea3db0

Browse files
author
Dave Abrahams
committed
[stdlib] More RandomAccessCollection conformances
I missed a few the first time around.
1 parent 5fb9518 commit 2ea3db0

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

stdlib/public/core/ContiguousArrayBuffer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ public func += <
532532
}
533533
}
534534

535-
extension _ContiguousArrayBuffer : Collection {
535+
extension _ContiguousArrayBuffer : RandomAccessCollection {
536536
/// The position of the first element in a non-empty collection.
537537
///
538538
/// In an empty collection, `startIndex == endIndex`.

stdlib/public/core/Mirror.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ public struct DictionaryLiteral<Key, Value> : DictionaryLiteralConvertible {
753753

754754
/// `Collection` conformance that allows `DictionaryLiteral` to
755755
/// interoperate with the rest of the standard library.
756-
extension DictionaryLiteral : Collection {
756+
extension DictionaryLiteral : RandomAccessCollection {
757757
/// The position of the first element in a non-empty `DictionaryLiteral`.
758758
///
759759
/// Identical to `endIndex` in an empty `DictionaryLiteral`.

stdlib/public/core/SliceBuffer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
/// Buffer type for `ArraySlice<Element>`.
1414
public // @testable
15-
struct _SliceBuffer<Element> : _ArrayBufferProtocol {
15+
struct _SliceBuffer<Element> : _ArrayBufferProtocol, RandomAccessCollection {
1616
internal typealias NativeStorage = _ContiguousArrayStorage<Element>
1717
public typealias NativeBuffer = _ContiguousArrayBuffer<Element>
1818

stdlib/public/core/StringCore.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ public struct _StringCore {
571571
}
572572
}
573573

574-
extension _StringCore : Collection {
574+
extension _StringCore : RandomAccessCollection {
575575
public // @testable
576576
var startIndex: Int {
577577
return 0

stdlib/public/core/UnicodeScalar.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ extension UnicodeScalar {
238238
}
239239
}
240240

241-
extension UnicodeScalar.UTF16View : Collection {
241+
extension UnicodeScalar.UTF16View : RandomAccessCollection {
242242
/// The position of the first code unit.
243243
var startIndex: Int {
244244
return 0

0 commit comments

Comments
 (0)