tlv: remove unused error return value

This commit also modifies a previous migration. Because the change is so
limited, we don't consider this a significant risk.
This commit is contained in:
Joost Jager
2019-11-22 12:10:04 +01:00
parent 883f9e5f9a
commit 5d4ceca038
6 changed files with 8 additions and 34 deletions

View File

@@ -219,7 +219,7 @@ func StubEncoder(v []byte) Encoder {
// MapToRecords encodes the passed TLV map as a series of regular tlv.Record
// instances. The resulting set of records will be returned in sorted order by
// their type.
func MapToRecords(tlvMap map[uint64][]byte) ([]Record, error) {
func MapToRecords(tlvMap map[uint64][]byte) []Record {
records := make([]Record, 0, len(tlvMap))
for k, v := range tlvMap {
// We don't pass in a decoder here since we don't actually know
@@ -234,7 +234,7 @@ func MapToRecords(tlvMap map[uint64][]byte) ([]Record, error) {
SortRecords(records)
return records, nil
return records
}
// SortRecords is a helper function that will sort a slice of records in place