@@ -503,7 +503,9 @@ public struct ByteBuffer {
503503
504504 @inlinable
505505 mutating func _setBytesAssumingUniqueBufferAccess( _ bytes: UnsafeRawBufferPointer , at index: _Index ) {
506- let targetPtr = UnsafeMutableRawBufferPointer ( fastRebase: self . _slicedStorageBuffer. dropFirst ( Int ( index) ) )
506+ let targetPtr = UnsafeMutableRawBufferPointer (
507+ rebasing: self . _slicedStorageBuffer. dropFirst ( Int ( index) )
508+ )
507509 targetPtr. copyMemory ( from: bytes)
508510 }
509511
@@ -515,7 +517,7 @@ public struct ByteBuffer {
515517 func ensureCapacityAndReturnStorageBase( capacity: Int ) -> UnsafeMutablePointer < UInt8 > {
516518 self . _ensureAvailableCapacity ( _Capacity ( capacity) , at: index)
517519 let newBytesPtr = UnsafeMutableRawBufferPointer (
518- fastRebase : self . _slicedStorageBuffer [ Int ( index) ..< Int ( index) + Int( capacity) ]
520+ rebasing : self . _slicedStorageBuffer [ Int ( index) ..< Int ( index) + Int( capacity) ]
519521 )
520522 return newBytesPtr. bindMemory ( to: UInt8 . self) . baseAddress!
521523 }
@@ -659,7 +661,7 @@ public struct ByteBuffer {
659661 self . _copyStorageAndRebaseIfNeeded ( )
660662 // this is safe because we always know that readerIndex >= writerIndex
661663 let range = Range < Int > ( uncheckedBounds: ( lower: self . readerIndex, upper: self . writerIndex) )
662- return try body ( . init( fastRebase : self . _slicedStorageBuffer [ range] ) )
664+ return try body ( . init( rebasing : self . _slicedStorageBuffer [ range] ) )
663665 }
664666
665667 /// Yields the bytes currently writable (`bytesWritable` = `capacity` - `writerIndex`). Before reading those bytes you must first
@@ -677,7 +679,7 @@ public struct ByteBuffer {
677679 _ body: ( UnsafeMutableRawBufferPointer ) throws -> T
678680 ) rethrows -> T {
679681 self . _copyStorageAndRebaseIfNeeded ( )
680- return try body ( . init( fastRebase : self . _slicedStorageBuffer. dropFirst ( self . writerIndex) ) )
682+ return try body ( . init( rebasing : self . _slicedStorageBuffer. dropFirst ( self . writerIndex) ) )
681683 }
682684
683685 /// This vends a pointer of the `ByteBuffer` at the `writerIndex` after ensuring that the buffer has at least `minimumWritableBytes` of writable bytes available.
@@ -748,7 +750,7 @@ public struct ByteBuffer {
748750 public func withUnsafeReadableBytes< T> ( _ body: ( UnsafeRawBufferPointer ) throws -> T ) rethrows -> T {
749751 // This is safe, writerIndex >= readerIndex
750752 let range = Range < Int > ( uncheckedBounds: ( lower: self . readerIndex, upper: self . writerIndex) )
751- return try body ( . init( fastRebase : self . _slicedStorageBuffer [ range] ) )
753+ return try body ( . init( rebasing : self . _slicedStorageBuffer [ range] ) )
752754 }
753755
754756 /// Yields a buffer pointer containing this `ByteBuffer`'s readable bytes. You may hold a pointer to those bytes
@@ -769,7 +771,7 @@ public struct ByteBuffer {
769771 let storageReference : Unmanaged < AnyObject > = Unmanaged . passUnretained ( self . _storage)
770772 // This is safe, writerIndex >= readerIndex
771773 let range = Range < Int > ( uncheckedBounds: ( lower: self . readerIndex, upper: self . writerIndex) )
772- return try body ( . init( fastRebase : self . _slicedStorageBuffer [ range] ) , storageReference)
774+ return try body ( . init( rebasing : self . _slicedStorageBuffer [ range] ) , storageReference)
773775 }
774776
775777 /// See `withUnsafeReadableBytesWithStorageManagement` and `withVeryUnsafeBytes`.
@@ -1120,7 +1122,7 @@ extension ByteBuffer {
11201122 self . _ensureAvailableCapacity ( _Capacity ( length) , at: _toIndex ( toIndex) )
11211123 self . withVeryUnsafeMutableBytes { ptr in
11221124 let srcPtr = UnsafeRawBufferPointer ( start: ptr. baseAddress!. advanced ( by: fromIndex) , count: length)
1123- let targetPtr = UnsafeMutableRawBufferPointer ( fastRebase : ptr. dropFirst ( toIndex) )
1125+ let targetPtr = UnsafeMutableRawBufferPointer ( rebasing : ptr. dropFirst ( toIndex) )
11241126 targetPtr. copyMemory ( from: srcPtr)
11251127 }
11261128
0 commit comments