Remove allocation for messages

This commit is contained in:
2025-05-10 21:19:25 -04:00
parent 583f9d8b8f
commit 716fb466fa
2 changed files with 20 additions and 33 deletions

View File

@@ -54,12 +54,11 @@ pub fn main() !void {
try SaprusClient.sendRelay(
if (r.len > 0) r else "Hello darkness my old friend",
dest,
gpa,
);
// std.debug.print("Sent: {s}\n", .{r});
return;
} else if (res.args.connect) |c| {
_ = SaprusClient.connect(if (c.len > 0) c else "Hello darkness my old friend", gpa) catch |err| switch (err) {
_ = SaprusClient.connect(if (c.len > 0) c else "Hello darkness my old friend") catch |err| switch (err) {
error.WouldBlock => null,
else => return err,
};