╭ changed ───────────────╮ │src/ui/widget/thread.zig│ ╰────────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1987 const author = if (auto.theirs) desc.theirs_author else desc.ours_author; │ │1988 const verb: []const u8 = if (auto.text == null) "removed" else "edited"; │ │1989 const label = switch (author) { │ │1990 - .user_name, .email => |name| try std.fmt.allocPrint(aa, " {s} by {s} ", .{ verb, name }), │ │1991 - .unknown => try std.fmt.allocPrint(aa, " {s} by {s} ", .{ verb, if (auto.theirs) @as([]const u8, "them") else "us" }), │ │1990 + .user_name, .email => |name| try aa.print(" {s} by {s} ", .{ verb, name }), │ │1991 + .unknown => try aa.print(" {s} by {s} ", .{ verb, if (auto.theirs) @as([]const u8, "them") else "us" }), │ │1992 }; │ │1993 var tb = try wgt.TextBox.init(allocator, auto.text orelse "(removed)", .{ .border_style = .single, .round_corners = true, .wrap_kind = .word, .label = label });│ │1994 errdefer tb.deinit(allocator); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1999 // a blank row on each side sets the group apart from │ │2000 // the flowing shared and auto-resolved chunks │ │2001 if (chunk_index > 0) try addGap(allocator, &box); │ │2002 - const name = try std.fmt.allocPrint(aa, "d{d}", .{hunk_index}); │ │2002 + const name = try aa.print("d{d}", .{hunk_index}); │ │2003 hunk_index += 1; │ │2004 const picked_theirs = data.theirsPicked(name); │ │2005 try addVersionRow(allocator, &box, try sideLabel(aa, desc.ours_author, true), hunk.ours orelse "", try useThisLink(session, data, name, false));│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2098 // the label of one side's version box, naming its author │ │2099 fn sideLabel(aa: std.mem.Allocator, author: ui.Author, ours: bool) ![]const u8 { │ │2100 return switch (author) { │ │2101 - .user_name, .email => |name| try std.fmt.allocPrint(aa, " edited by {s} ", .{name}),│ │2101 + .user_name, .email => |name| try aa.print(" edited by {s} ", .{name}), │ │2102 .unknown => if (ours) " current version " else " their version ", │ │2103 }; │ │2104 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2119 try picks.appendSlice(aa, name); │ │2120 } │ │2121 const route = resolveRoute(data.identity, data.selected_id, picks.items) orelse return error.RouteTooLong; │ │2122 - return std.fmt.allocPrint(aa, "a:{s}", .{try route.toUrl(session.page_arena)}); │ │2122 + return aa.print("a:{s}", .{try route.toUrl(session.page_arena)}); │ │2123 } │ │2124 │ │2125 fn addRow(allocator: std.mem.Allocator, box: *wgt.Box(Widget), text: []const u8, bottom_label: []const u8, link: []const u8) !void {│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2405 fn submitSearch(self: *This, text: []const u8) !void { │ │2406 if (text.len == 0 and self.data.search == null) return; │ │2407 const selected = self.header().getSelectedIndex() orelse 0; │ │2408 - const status: Status = if (selected < status_count) splitStatus(selected) else @enumFromInt(0); │ │2408 + const status: Status = if (selected < status_count) splitStatus(selected) else @fromBackingInt(@intCast(0));│ │2409 const route = listRoute(self.data.identity, status, self.data.label, "") orelse return; │ │2410 try self.session.navigate(route.withSearch(text) orelse return); │ │2411 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2772 labels_input.clear(allocator); │ │2773 description_input.clear(allocator); │ │2774 │ │2775 - const route = listRoute(self.data.identity, @enumFromInt(0), "", &event_id_hex) orelse return; │ │2775 + const route = listRoute(self.data.identity, @fromBackingInt(@intCast(0)), "", &event_id_hex) orelse return;│ │2776 try self.session.navigate(route); │ │2777 } │ │2778 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2885 if (!entryDraft(entry.*)) return; │ │2886 const author = ((try self.session.authorize(self.data.identity, .read)) orelse return).author; │ │2887 try self.data.publishDraft(self.session, allocator, author, entry.id); │ │2888 - const route = listRoute(self.data.identity, @enumFromInt(0), "", entry.id) orelse return; │ │2888 + const route = listRoute(self.data.identity, @fromBackingInt(@intCast(0)), "", entry.id) orelse return;│ │2889 try self.session.navigate(route); │ │2890 } else unreachable, │ │2891 .merge => if (comptime supports_merge) { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯