[stdlib] More RandomAccessCollection conformances

I missed a few the first time around.
This commit is contained in:
Dave Abrahams
2016-05-01 18:37:45 -07:00
parent 5fb95180b5
commit 2ea3db0443
5 changed files with 5 additions and 5 deletions

View File

@@ -532,7 +532,7 @@ public func += <
} }
} }
extension _ContiguousArrayBuffer : Collection { extension _ContiguousArrayBuffer : RandomAccessCollection {
/// The position of the first element in a non-empty collection. /// The position of the first element in a non-empty collection.
/// ///
/// In an empty collection, `startIndex == endIndex`. /// In an empty collection, `startIndex == endIndex`.

View File

@@ -753,7 +753,7 @@ public struct DictionaryLiteral<Key, Value> : DictionaryLiteralConvertible {
/// `Collection` conformance that allows `DictionaryLiteral` to /// `Collection` conformance that allows `DictionaryLiteral` to
/// interoperate with the rest of the standard library. /// interoperate with the rest of the standard library.
extension DictionaryLiteral : Collection { extension DictionaryLiteral : RandomAccessCollection {
/// The position of the first element in a non-empty `DictionaryLiteral`. /// The position of the first element in a non-empty `DictionaryLiteral`.
/// ///
/// Identical to `endIndex` in an empty `DictionaryLiteral`. /// Identical to `endIndex` in an empty `DictionaryLiteral`.

View File

@@ -12,7 +12,7 @@
/// Buffer type for `ArraySlice<Element>`. /// Buffer type for `ArraySlice<Element>`.
public // @testable public // @testable
struct _SliceBuffer<Element> : _ArrayBufferProtocol { struct _SliceBuffer<Element> : _ArrayBufferProtocol, RandomAccessCollection {
internal typealias NativeStorage = _ContiguousArrayStorage<Element> internal typealias NativeStorage = _ContiguousArrayStorage<Element>
public typealias NativeBuffer = _ContiguousArrayBuffer<Element> public typealias NativeBuffer = _ContiguousArrayBuffer<Element>

View File

@@ -571,7 +571,7 @@ public struct _StringCore {
} }
} }
extension _StringCore : Collection { extension _StringCore : RandomAccessCollection {
public // @testable public // @testable
var startIndex: Int { var startIndex: Int {
return 0 return 0

View File

@@ -238,7 +238,7 @@ extension UnicodeScalar {
} }
} }
extension UnicodeScalar.UTF16View : Collection { extension UnicodeScalar.UTF16View : RandomAccessCollection {
/// The position of the first code unit. /// The position of the first code unit.
var startIndex: Int { var startIndex: Int {
return 0 return 0