Skip to content

Commit 6cf609d

Browse files
committed
whitespace
Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
1 parent 8fd64e3 commit 6cf609d

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/swift/Data.swift

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ public struct DispatchData : RandomAccessCollection {
118118
///
119119
/// - parameter buffer: The buffer of bytes to append. The size is calculated from `SourceType` and `buffer.count`.
120120
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+
}
125125
}
126126

127127
private func _copyBytesHelper(to pointer: UnsafeMutablePointer<UInt8>, from range: CountableRange<Index>) {
@@ -180,10 +180,9 @@ public struct DispatchData : RandomAccessCollection {
180180
guard !copyRange.isEmpty else { return 0 }
181181

182182
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+
}
187186
return copyRange.count
188187
}
189188

0 commit comments

Comments
 (0)