We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6f8834 commit c5fc1e3Copy full SHA for c5fc1e3
stdlib/public/SDK/Foundation/Codable.swift
@@ -59,9 +59,7 @@ extension Data : Codable {
59
var caughtError: Error? = nil
60
self.enumerateBytes { (buffer: UnsafeBufferPointer<UInt8>, byteIndex: Data.Index, stop: inout Bool) in
61
do {
62
- for byte in buffer {
63
- try bytesContainer.encode(byte)
64
- }
+ try bytesContainer.encode(contentsOf: buffer)
65
} catch {
66
caughtError = error
67
stop = true
0 commit comments