Signed-off-by: Sebastian <sebastian@sebsite.pw>
---
haredoc.ha | 10 +++++-----
main.ha | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/haredoc.ha b/haredoc.ha
index 480650c..d89402a 100644
--- a/haredoc.ha
+++ b/haredoc.ha
@@ -39,7 +39,7 @@ fn handle_haredoc(
let decls: []ast::decl = [];
defer {
for (let i = 0z; i < len(decls); i += 1) {
- ast::decl_free(decls[i]);
+ ast::decl_finish(decls[i]);
};
free(decls);
};
@@ -94,10 +94,10 @@ fn handle_haredoc(
};
const buf = strio::dynamic();
- unparse_hare(buf, *selected)!;
- fmt::fprintf(buf, " // https://docs.harelang.org/{}#{}", path, decl)!;
- const resp = strio::finish(buf);
- defer free(resp);
+ defer free(&buf);
+ unparse_hare(&buf, *selected)!;
+ fmt::fprintf(&buf, " // https://docs.harelang.org/{}#{}", path, decl)!;
+ const resp = strio::string(&buf);
irc::privmsg(state.conn, resp, msg.params[0])!;
};
diff --git a/main.ha b/main.ha
index 5866758..77ede77 100644
--- a/main.ha
+++ b/main.ha
@@ -33,7 +33,7 @@ export fn main() void = {
fmt::fatal("Failed to dial IRC server: {}",
irc::strerror(err));
};
- defer irc::close(conn);
+ defer irc::close(conn)!;
const chan = irc::join(conn, channel)!;
let state = state {
--
2.35.1
Thanks!
To git@git.sr.ht:~sircmpwn/harebot
2cee29e..34e882c master -> master