diff options
Diffstat (limited to 'src/Server/message.zig')
| -rw-r--r-- | src/Server/message.zig | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Server/message.zig b/src/Server/message.zig index f22410f..8005453 100644 --- a/src/Server/message.zig +++ b/src/Server/message.zig @@ -5,6 +5,8 @@ const Reader = std.Io.Reader; const Payload = @import("Payload.zig"); +pub const parse = @import("parse.zig"); + pub const Control = @typeInfo(Message).@"union".tag_type.?; pub const Message = union(enum) { @@ -108,14 +110,13 @@ pub const Message = union(enum) { /// The message payload data. payload: []const u8, - pub fn toMsg(self: Pub, alloc: Allocator, sid: []const u8) !Msg { - const res: Msg = .{ + pub fn toMsg(self: Pub, sid: []const u8) Msg { + return .{ .subject = self.subject, .sid = sid, .reply_to = self.reply_to, .payload = self.payload, }; - return res.dupe(alloc); } }; pub const HPub = struct { |
