File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ extension MutableSpan where Element: ~Copyable {
237237extension MutableSpan where Element: ~ Copyable {
238238
239239 @_alwaysEmitIntoClient
240- public var count : Int { _count }
240+ public var count : Int { _assumeNonNegative ( _count) }
241241
242242 @_alwaysEmitIntoClient
243243 public var isEmpty : Bool { _count == 0 }
@@ -246,7 +246,7 @@ extension MutableSpan where Element: ~Copyable {
246246
247247 @_alwaysEmitIntoClient
248248 public var indices : Range < Index > {
249- unsafe Range( _uncheckedBounds: ( 0 , _count ) )
249+ unsafe Range( _uncheckedBounds: ( 0 , count ) )
250250 }
251251}
252252
Original file line number Diff line number Diff line change @@ -391,7 +391,7 @@ extension Span where Element: ~Copyable {
391391 /// - Complexity: O(1)
392392 @_alwaysEmitIntoClient
393393 @_semantics ( " fixed_storage.get_count " )
394- public var count : Int { _count }
394+ public var count : Int { _assumeNonNegative ( _count) }
395395
396396 /// A Boolean value indicating whether the span is empty.
397397 ///
@@ -408,7 +408,7 @@ extension Span where Element: ~Copyable {
408408 /// - Complexity: O(1)
409409 @_alwaysEmitIntoClient
410410 public var indices : Range < Index > {
411- unsafe Range( _uncheckedBounds: ( 0 , _count ) )
411+ unsafe Range( _uncheckedBounds: ( 0 , count ) )
412412 }
413413}
414414
You can’t perform that action at this time.
0 commit comments