aboutsummaryrefslogtreecommitdiff
path: root/builtins/array.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-03 15:00:28 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-03 15:00:28 -0400
commit82849ba783e2b8f8e3a040751cd964313470e7f2 (patch)
tree89380c5026b4da43d88658a5acf4d2c656ead8fe /builtins/array.c
parent29a87ff325b5d9682593d66bd17964e5c2447510 (diff)
Use Text("...") literal constructor instead of Text$from_str("...")
function call.
Diffstat (limited to 'builtins/array.c')
-rw-r--r--builtins/array.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtins/array.c b/builtins/array.c
index 63539559..68f581c8 100644
--- a/builtins/array.c
+++ b/builtins/array.c
@@ -537,17 +537,17 @@ public bool Array$equal(const array_t *x, const array_t *y, const TypeInfo *type
public Text_t Array$as_text(const array_t *arr, bool colorize, const TypeInfo *type)
{
if (!arr)
- return Text$concat(Text$from_str("["), generic_as_text(NULL, false, type->ArrayInfo.item), Text$from_str("]"));
+ return Text$concat(Text("["), generic_as_text(NULL, false, type->ArrayInfo.item), Text("]"));
const TypeInfo *item_type = type->ArrayInfo.item;
- Text_t text = Text$from_str("[");
+ Text_t text = Text("[");
for (int64_t i = 0; i < arr->length; i++) {
if (i > 0)
- text = Text$concat(text, Text$from_str(", "));
+ text = Text$concat(text, Text(", "));
Text_t item_text = generic_as_text(arr->data + i*arr->stride, colorize, item_type);
text = Text$concat(text, item_text);
}
- text = Text$concat(text, Text$from_str("]"));
+ text = Text$concat(text, Text("]"));
return text;
}