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 {
237
237
extension MutableSpan where Element: ~ Copyable {
238
238
239
239
@_alwaysEmitIntoClient
240
- public var count : Int { _count }
240
+ public var count : Int { _assumeNonNegative ( _count) }
241
241
242
242
@_alwaysEmitIntoClient
243
243
public var isEmpty : Bool { _count == 0 }
@@ -246,7 +246,7 @@ extension MutableSpan where Element: ~Copyable {
246
246
247
247
@_alwaysEmitIntoClient
248
248
public var indices : Range < Index > {
249
- unsafe Range( _uncheckedBounds: ( 0 , _count ) )
249
+ unsafe Range( _uncheckedBounds: ( 0 , count ) )
250
250
}
251
251
}
252
252
Original file line number Diff line number Diff line change @@ -391,7 +391,7 @@ extension Span where Element: ~Copyable {
391
391
/// - Complexity: O(1)
392
392
@_alwaysEmitIntoClient
393
393
@_semantics ( " fixed_storage.get_count " )
394
- public var count : Int { _count }
394
+ public var count : Int { _assumeNonNegative ( _count) }
395
395
396
396
/// A Boolean value indicating whether the span is empty.
397
397
///
@@ -408,7 +408,7 @@ extension Span where Element: ~Copyable {
408
408
/// - Complexity: O(1)
409
409
@_alwaysEmitIntoClient
410
410
public var indices : Range < Index > {
411
- unsafe Range( _uncheckedBounds: ( 0 , _count ) )
411
+ unsafe Range( _uncheckedBounds: ( 0 , count ) )
412
412
}
413
413
}
414
414
You can’t perform that action at this time.
0 commit comments