One method declaration; two Zig annoyances

from blog openmymind.net, | ↗ original
↗ original
In the following code, we create a Post structure with a skeleton format method. Despite being pretty comfortable with Zig, I could stare at this code for hours and not realize that it has two issues. pub fn main() !void { } const Post = struct { raw: []const u8, pub fn format(self: Post, format: Format) void { _ = self; _...