mirror of
https://github.com/odin-lang/Odin.git
synced 2026-05-26 13:48:23 +00:00
omit value when formatting map[T]struct{}
This commit is contained in:
@@ -3132,12 +3132,14 @@ fmt_map :: proc(fi: ^Info, v: any, info: runtime.Type_Info_Map, verb: rune) {
|
||||
value := runtime.map_cell_index_dynamic(vs, info.map_info.vs, bucket_index)
|
||||
|
||||
fmt_arg(&Info{writer = fi.writer}, any{rawptr(key), info.key.id}, verb)
|
||||
if hash {
|
||||
io.write_string(fi.writer, " = ", &fi.n)
|
||||
} else {
|
||||
io.write_string(fi.writer, "=", &fi.n)
|
||||
if info.value.size > 0 {
|
||||
if hash {
|
||||
io.write_string(fi.writer, " = ", &fi.n)
|
||||
} else {
|
||||
io.write_string(fi.writer, "=", &fi.n)
|
||||
}
|
||||
fmt_arg(fi, any{rawptr(value), info.value.id}, verb)
|
||||
}
|
||||
fmt_arg(fi, any{rawptr(value), info.value.id}, verb)
|
||||
|
||||
if do_trailing_comma { io.write_string(fi.writer, ",\n", &fi.n) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user