Skip to content

Commit

Permalink
key lengths always trump lexicographical sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
whyrusleeping committed Jan 9, 2023
1 parent b0c46b9 commit 196a2cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -1317,6 +1317,9 @@ func emitCborMarshalStructMap(w io.Writer, gti *GenTypeInfo) error {
if len(fi.MapKey) < len(fi.MapKey) {
return true
}
if len(fi.MapKey) > len(fi.MapKey) {
return false
}

// TODO: is this properly canonical?
return fi.MapKey < fj.MapKey
Expand Down

0 comments on commit 196a2cd

Please sign in to comment.