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 @@ -575,6 +575,17 @@ extension Span where Element: ~Copyable {
575
575
unsafe _extracting( unchecked: bounds. relative ( to: indices) )
576
576
}
577
577
578
+ @_alwaysEmitIntoClient
579
+ @lifetime ( self )
580
+ public func _extracting(
581
+ unchecked bounds: ClosedRange < Index >
582
+ ) -> Self {
583
+ let range = Range (
584
+ _uncheckedBounds: ( bounds. lowerBound, bounds. upperBound&+ 1 )
585
+ )
586
+ return unsafe _extracting( unchecked: range)
587
+ }
588
+
578
589
/// Constructs a new span over all the items of this span.
579
590
///
580
591
/// 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