File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ public struct TLVDecoder {
3030
3131 public func decode < T: Decodable > ( _ type: T . Type , from data: Data ) throws -> T {
3232
33+ log ? ( " Will decode \( String ( reflecting: T . self) ) " )
34+
3335 let items = try decode ( data)
3436
3537 let options = Decoder . Options ( numericFormat: numericFormat)
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ public struct TLVEncoder {
3030
3131 public func encode < T: Encodable > ( _ value: T ) throws -> Data {
3232
33+ log ? ( " Will encode \( String ( reflecting: T . self) ) " )
34+
3335 let options = Encoder . Options ( numericFormat: numericFormat)
3436 let encoder = Encoder ( userInfo: userInfo, log: log, options: options)
3537 try value. encode ( to: encoder)
@@ -594,6 +596,7 @@ internal final class TLVUnkeyedEncodingContainer: UnkeyedEncodingContainer {
594596private extension TLVEncodable {
595597
596598 var copyingBytes : Data {
599+
597600 #if swift(>=5)
598601 return withUnsafePointer ( to: self , { Data ( bytes: $0, count: MemoryLayout< Self> . size) } )
599602 #else
You can’t perform that action at this time.
0 commit comments