File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -421,6 +421,17 @@ extension RawSpan {
421
421
unsafe _extracting( unchecked: bounds. relative ( to: byteOffsets) )
422
422
}
423
423
424
+ @_alwaysEmitIntoClient
425
+ @lifetime ( self )
426
+ public func _extracting(
427
+ unchecked bounds: ClosedRange < Int >
428
+ ) -> Self {
429
+ let range = Range (
430
+ _uncheckedBounds: ( bounds. lowerBound, bounds. upperBound&+ 1 )
431
+ )
432
+ return unsafe _extracting( unchecked: range)
433
+ }
434
+
424
435
/// Constructs a new span over all the bytes of this span.
425
436
///
426
437
/// The returned span's first byte is always at offset 0; unlike buffer
Original file line number Diff line number Diff line change @@ -588,6 +588,17 @@ extension Span where Element: ~Copyable {
588
588
unsafe _extracting( unchecked: bounds. relative ( to: indices) )
589
589
}
590
590
591
+ @_alwaysEmitIntoClient
592
+ @lifetime ( self )
593
+ public func _extracting(
594
+ unchecked bounds: ClosedRange < Index >
595
+ ) -> Self {
596
+ let range = Range (
597
+ _uncheckedBounds: ( bounds. lowerBound, bounds. upperBound&+ 1 )
598
+ )
599
+ return unsafe _extracting( unchecked: range)
600
+ }
601
+
591
602
/// Constructs a new span over all the items of this span.
592
603
///
593
604
/// The returned span's first item is always at offset 0; unlike buffer
You can’t perform that action at this time.
0 commit comments