BinaryCoder
BinaryCoder copied to clipboard
Improper decoding of binary arrays.
In the Array.init(fromBinary:) extension, the array elements should likewise be initialized with init(fromBinary:), not init(from:) as in the code. As it is, array elements are decoded by the implicit decoder but not by explicit binary decoders.
This:
let decoded = try binaryElement.init(from: decoder)
should be:
let decoded = try binaryElement.init(fromBinary: decoder)