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.
1 parent 5064297 commit c606370Copy full SHA for c606370
stdlib/public/core/Span/Span.swift
@@ -391,7 +391,7 @@ extension Span where Element: ~Copyable {
391
/// - Complexity: O(1)
392
@_alwaysEmitIntoClient
393
@_semantics("fixed_storage.get_count")
394
- public var count: Int { _count }
+ public var count: Int { _assumeNonNegative(_count) }
395
396
/// A Boolean value indicating whether the span is empty.
397
///
@@ -408,7 +408,7 @@ extension Span where Element: ~Copyable {
408
409
410
public var indices: Range<Index> {
411
- unsafe Range(_uncheckedBounds: (0, _count))
+ unsafe Range(_uncheckedBounds: (0, count))
412
}
413
414
0 commit comments