╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───────────────╮ │src/ui/widget/thread.zig│ ╰────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1627 buttons[1] = .{ │ │1628 .label = "squash and merge patch", │ │1629 .bottom_label = mergeBottomLabel(availability.squash), │ │1630 - .action = if (availability.squash == .clean) try std.fmt.allocPrint(aa, "{s}{s}/squash", .{ ui.submit_action_prefix, page_url }) else "",│ │1630 + .action = if (availability.squash == .clean) try aa.print("{s}{s}/squash", .{ ui.submit_action_prefix, page_url }) else "", │ │1631 }; │ │1632 button_count += 1; │ │1633 } else unreachable; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1642 else │ │1643 ui.RoutablePage.repoThreadCommentNewRoute(kind, data.identity, data.selected_id, data.comment_id) orelse return error.RouteTooLong;│ │1644 const page_url = try route.toUrl(session.page_arena); │ │1645 - const action = try std.fmt.allocPrint(session.page_arena.allocator(), "form:{s}", .{page_url}); │ │1645 + const action = try session.page_arena.allocator().print("form:{s}", .{page_url}); │ │1646 const page = data.comment_page; │ │1647 const top_level = if (page) |p| std.mem.eql(u8, &p.selected.comment.event.parent_id, &p.selected.comment.event.thread_id) else false; │ │1648 const parent_route = if (editing) │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1692 ui.RoutablePage.repoThreadEditRoute(kind, data.identity, data.selected_id) orelse return error.RouteTooLong│ │1693 else │ │1694 ui.RoutablePage.repoThreadNewRoute(kind, data.identity) orelse return error.RouteTooLong; │ │1695 - const action = try std.fmt.allocPrint(aa, "form:{s}", .{try route.toUrl(session.page_arena)}); │ │1695 + const action = try aa.print("form:{s}", .{try route.toUrl(session.page_arena)}); │ │1696 const record = if (data.view == .edit) │ │1697 (if (data.selectedThread()) |entry| &entry.record else null) │ │1698 else │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1753 try addRow(allocator, &list_box, "← previous", "", try windowLink(session.page_arena, data, status_maybe, drafts, prev));│ │1754 for (win.items) |entry| { │ │1755 const label: []const u8 = if (entry.comments.count > 0) │ │1756 - try std.fmt.allocPrint(session.page_arena.allocator(), " {d} comments ", .{entry.comments.count}) │ │1756 + try session.page_arena.allocator().print(" {d} comments ", .{entry.comments.count}) │ │1757 else │ │1758 ""; │ │1759 try addRow(allocator, &list_box, entry.record.event.title, label, try rowLink(session.page_arena, data, entry.id)); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1862 var parent = try ui.authorBox(allocator, session.page_arena, author); │ │1863 errdefer parent.deinit(allocator); │ │1864 parent.options.label = " replying to "; │ │1865 - parent.getFocus().kind = .{ .custom = try std.fmt.allocPrint(session.page_arena.allocator(), "a:{s}", .{try parent_route.toUrl(session.page_arena)}) }; │ │1865 + parent.getFocus().kind = .{ .custom = try session.page_arena.allocator().print("a:{s}", .{try parent_route.toUrl(session.page_arena)}) }; │ │1866 try box.children.put(allocator, parent.getFocus().id, .{ .widget = .{ .text_box = parent }, .rect = null, .min_size = .{ .width = null, .height = 3 } });│ │1867 box.getFocus().child_id = parent.getFocus().id; │ │1868 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1943 var box = try wgt.Box(Widget).init(allocator, .{ .border_style = null, .direction = .vert }); │ │1944 errdefer box.deinit(allocator); │ │1945 const route = resolveRoute(data.identity, data.selected_id, data.theirs_picks) orelse return error.RouteTooLong; │ │1946 - box.getFocus().kind = .{ .custom = try std.fmt.allocPrint(aa, "form:{s}", .{try route.toUrl(session.page_arena)}) };│ │1946 + box.getFocus().kind = .{ .custom = try aa.print("form:{s}", .{try route.toUrl(session.page_arena)}) }; │ │1947 │ │1948 if (conflict.title) |*fc| { │ │1949 try addLabel(allocator, &box, "title conflict:"); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │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 {│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯