aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-09-21 15:50:43 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-09-21 15:50:43 -0400
commitb58daa1469b36fdc7a8c3441ce33e0a6e6e61e0b (patch)
tree8fe86cfa9a21f09e43516edbe88faedb963f94b3 /src/stdlib
parent8bdc6ed0938c48d36dd1d5ec3ba86f82e472e375 (diff)
Deprecate more set stuff
Diffstat (limited to 'src/stdlib')
-rw-r--r--src/stdlib/tables.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/stdlib/tables.c b/src/stdlib/tables.c
index 7d5ff4ef..6e37751e 100644
--- a/src/stdlib/tables.c
+++ b/src/stdlib/tables.c
@@ -534,14 +534,12 @@ Text_t Table$as_text(const void *obj, bool colorize, const TypeInfo_t *type) {
__typeof(type->TableInfo) table = type->TableInfo;
if (!t) {
- if (table.value != &Void$info)
- return Text$concat(Text("{"), generic_as_text(NULL, false, table.key), Text("="),
- generic_as_text(NULL, false, table.value), Text("}"));
- else return Text$concat(Text("|"), generic_as_text(NULL, false, table.key), Text("|"));
+ return Text$concat(Text("{"), generic_as_text(NULL, false, table.key), Text("="),
+ generic_as_text(NULL, false, table.value), Text("}"));
}
int64_t val_off = (int64_t)value_offset(type);
- Text_t text = table.value == &Void$info ? Text("|") : Text("{");
+ Text_t text = Text("{");
for (int64_t i = 0, length = Table$length(*t); i < length; i++) {
if (i > 0) text = Text$concat(text, Text(", "));
void *entry = GET_ENTRY(*t, i);
@@ -554,7 +552,7 @@ Text_t Table$as_text(const void *obj, bool colorize, const TypeInfo_t *type) {
text = Text$concat(text, Text("; fallback="), Table$as_text(t->fallback, colorize, type));
}
- text = Text$concat(text, table.value == &Void$info ? Text("|") : Text("}"));
+ text = Text$concat(text, Text("}"));
return text;
}