map-pointer: minor fixes and cleanups

This commit is contained in:
Isaac Freund
2022-11-25 13:57:35 +01:00
parent cacc986166
commit 3141940efb
5 changed files with 42 additions and 41 deletions

View File

@ -442,12 +442,7 @@ pub fn runCommand(self: *Self, args: []const [:0]const u8) void {
command.Error.Other => out.?,
else => command.errToMsg(err),
};
if (args.len == 0) {
std.log.scoped(.command).err("{s}", .{failure_message});
} else {
std.log.scoped(.command).err("{s}: {s}", .{ args[0], failure_message });
}
std.log.scoped(.command).err("{s}: {s}", .{ args[0], failure_message });
return;
};
if (out) |s| {