File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -118,10 +118,10 @@ public struct DispatchData : RandomAccessCollection {
118
118
///
119
119
/// - parameter buffer: The buffer of bytes to append. The size is calculated from `SourceType` and `buffer.count`.
120
120
public mutating func append< SourceType> ( _ buffer : UnsafeBufferPointer < SourceType > ) {
121
- let count = buffer. count * sizeof( SourceType . self)
122
- buffer. baseAddress? . withMemoryRebound ( to: UInt8 . self, capacity: count) {
123
- self . append ( $0, count: count)
124
- }
121
+ let count = buffer. count * sizeof( SourceType . self)
122
+ buffer. baseAddress? . withMemoryRebound ( to: UInt8 . self, capacity: count) {
123
+ self . append ( $0, count: count)
124
+ }
125
125
}
126
126
127
127
private func _copyBytesHelper( to pointer: UnsafeMutablePointer < UInt8 > , from range: CountableRange < Index > ) {
@@ -180,10 +180,9 @@ public struct DispatchData : RandomAccessCollection {
180
180
guard !copyRange. isEmpty else { return 0 }
181
181
182
182
let bufferCapacity = buffer. count * sizeof( DestinationType . self)
183
- buffer. baseAddress? . withMemoryRebound ( to: UInt8 . self, capacity: bufferCapacity) {
184
-
185
- _copyBytesHelper ( to: $0, from: copyRange)
186
- }
183
+ buffer. baseAddress? . withMemoryRebound ( to: UInt8 . self, capacity: bufferCapacity) {
184
+ _copyBytesHelper ( to: $0, from: copyRange)
185
+ }
187
186
return copyRange. count
188
187
}
189
188
You can’t perform that action at this time.
0 commit comments