aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/paths.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-12-23 13:58:33 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-12-23 14:00:42 -0500
commit4a6c0438f9a2c82e834116e3e1bc110b8cae8432 (patch)
tree3cae849d6f4688a68f7417f103a6a2feaf421b06 /src/stdlib/paths.c
parenta89500afd9a34f2af94ab6fcd7a0469b0450732a (diff)
Big speedup my trimming down MAP_LIST macro and inlining some
applications of it.
Diffstat (limited to 'src/stdlib/paths.c')
-rw-r--r--src/stdlib/paths.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stdlib/paths.c b/src/stdlib/paths.c
index 9c74f4c1..e3028cce 100644
--- a/src/stdlib/paths.c
+++ b/src/stdlib/paths.c
@@ -690,7 +690,7 @@ bool Path$has_extension(Path_t path, Text_t extension) {
if (extension.length == 0)
return !Text$has(Text$from(last, I(2)), Text(".")) || Text$equal_values(last, Text(".."));
- if (!Text$starts_with(extension, Text("."), NULL)) extension = Texts(Text("."), extension);
+ if (!Text$starts_with(extension, Text("."), NULL)) extension = Text$concat(Text("."), extension);
return Text$ends_with(Text$from(last, I(2)), extension, NULL);
}
@@ -879,7 +879,7 @@ Text_t Path$as_text(const void *obj, bool color, const TypeInfo_t *type) {
&& (path->components.length == 0 || !Text$equal_values(*(Text_t *)(path->components.data), Text(".."))))
text = Text$concat(path->components.length > 0 ? Text("./") : Text("."), text);
- if (color) text = Texts(Text("\033[32;1m"), text, Text("\033[m"));
+ if (color) text = Text$concat(Text("\033[32;1m"), text, Text("\033[m"));
return text;
}