From bde3ec33e5a9eab8fcdbe6eaa6038fb6285e5005 Mon Sep 17 00:00:00 2001 From: copygirl Date: Sun, 31 Mar 2024 11:57:13 +0200 Subject: [PATCH] Fix missing newlines in errors in Context.lookupAndRegister --- src/context.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/context.zig b/src/context.zig index c59a761..1fc97d4 100644 --- a/src/context.zig +++ b/src/context.zig @@ -118,7 +118,7 @@ pub fn Context(comptime ctx: anytype) type { const id_ptr = lookupMut(T); if (id_ptr.* != 0 and id_ptr.* != entity.raw) { if (!meta.isNull(error_writer)) - try std.fmt.format(error_writer, "Trying to register lookup for entity '{any}' as {d}, but it's already registered as {d}", .{ entity, entity.raw, id_ptr.* }); + try std.fmt.format(error_writer, "Trying to register lookup for entity '{}' as {d}, but it's already registered as {d}\n", .{ entity, entity.raw, id_ptr.* }); return error.LookupIdMismatch; } id_ptr.* = entity.raw; @@ -126,9 +126,9 @@ pub fn Context(comptime ctx: anytype) type { } else { if (!meta.isNull(error_writer)) { if (parent) |p| - try std.fmt.format(error_writer, "Could not find child '{s}' of parent '{any}'", .{ name, p }) + try std.fmt.format(error_writer, "Could not find child '{s}' of parent '{}'\n", .{ name, p }) else - try std.fmt.format(error_writer, "Could not find root entity '{s}'", .{name}); + try std.fmt.format(error_writer, "Could not find root entity '{s}'\n", .{name}); } return error.EntityNotFound; }