We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a35b0c0 commit ec2fb22Copy full SHA for ec2fb22
1 file changed
Sources/Encoder.swift
@@ -171,14 +171,14 @@ internal extension TLVEncoder.Encoder {
171
@inline(__always)
172
func boxNumeric <T: TLVEncodable & FixedWidthInteger> (_ value: T) -> Data {
173
174
- let endianValue: T
+ let numericValue: T
175
switch options.numericFormat {
176
case .bigEndian:
177
- endianValue = value.bigEndian
+ numericValue = value.bigEndian
178
case .littleEndian:
179
- endianValue = value.littleEndian
+ numericValue = value.littleEndian
180
}
181
- return endianValue.tlvData
+ return box(numericValue)
182
183
184
func boxEncodable <T: Encodable> (_ value: T) throws -> Data {
0 commit comments