We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e055b4b + 0a77ce3 commit 0968d16Copy full SHA for 0968d16
stdlib/public/core/ArrayBuffer.swift
@@ -315,7 +315,7 @@ extension _ArrayBuffer {
315
/// The number of elements the buffer can store without reallocation.
316
@inlinable
317
internal var capacity: Int {
318
- return _fastPath(_isNative) ? _native.capacity : _nonNative.count
+ return _fastPath(_isNative) ? _native.capacity : _nonNative.endIndex
319
}
320
321
@@ -510,7 +510,6 @@ extension _ArrayBuffer {
510
511
512
internal var _nonNative: _CocoaArrayWrapper {
513
- @inline(__always)
514
get {
515
_internalInvariant(_isClassOrObjCExistential(Element.self))
516
return _CocoaArrayWrapper(_storage.objCInstance)
0 commit comments