╭ changed ───────────────╮ │src/ui/widget/thread.zig│ ╰────────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1545 - return std.fmt.allocPrint(page_arena.allocator(), "a:{s}", .{try route.toUrl(page_arena)}); │ │1545 + return page_arena.allocator().print("a:{s}", .{try route.toUrl(page_arena)}); │ │1546 } │ │1547 - return listLink(page_arena, data.identity, status_maybe orelse @enumFromInt(0), data.label, id, data.search orelse ""); │ │1547 + return listLink(page_arena, data.identity, status_maybe orelse @fromBackingInt(@intCast(0)), data.label, id, data.search orelse ""); │ │1548 } │ │1549 │ │1550 fn labelLink(page_arena: *std.heap.ArenaAllocator, identity: []const u8, status: Status, label: []const u8, search: []const u8) ![]const u8 {│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1572 } │ │1573 const stack = &outer.children.values()[stack_index].widget.stack; │ │1574 │ │1575 - inline for (@typeInfo(Status).@"enum".fields) |field| { │ │1576 - var split = try initSplit(allocator, session, data, @enumFromInt(field.value), false); │ │1575 + inline for (@typeInfo(Status).@"enum".field_values) |value| { │ │1576 + var split = try initSplit(allocator, session, data, @fromBackingInt(@intCast(value)), false);│ │1577 errdefer split.deinit(allocator); │ │1578 try stack.children.put(allocator, split.getFocus().id, .{ .box = split }); │ │1579 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1586 defer items.deinit(allocator); │ │1587 // when filtered, the first item clears the filter │ │1588 if (data.label.len != 0) │ │1589 - try items.append(allocator, .{ .text = "✕", .link = try listLink(session.page_arena, data.identity, @enumFromInt(0), "", "", data.search orelse "") }); │ │1589 + try items.append(allocator, .{ .text = "✕", .link = try listLink(session.page_arena, data.identity, @fromBackingInt(@intCast(0)), "", "", data.search orelse "") }); │ │1590 for (data.labels) |label| │ │1591 - try items.append(allocator, .{ .text = label, .link = try labelLink(session.page_arena, data.identity, @enumFromInt(0), label, data.search orelse "") }); │ │1591 + try items.append(allocator, .{ .text = label, .link = try labelLink(session.page_arena, data.identity, @fromBackingInt(@intCast(0)), label, data.search orelse "") });│ │1592 try tf.setItems(allocator, items.items); │ │1593 try stack.children.put(allocator, tf.getFocus().id, .{ .word_flow = tf }); │ │1594 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1606 .merge => mergeRoute(data.identity, data.selected_id), │ │1607 } orelse return error.RouteTooLong; │ │1608 const page_url = try route.toUrl(session.page_arena); │ │1609 - const action = try std.fmt.allocPrint(aa, "form:{s}", .{page_url}); │ │1609 + const action = try aa.print("form:{s}", .{page_url}); │ │1610 const event_name = if (data.comment_id.len == 0) thread_name else "comment"; │ │1611 var label_buf: ["remove ".len + @max(thread_name.len, "comment".len)]u8 = undefined;│ │1612 var buttons: [2]ConfirmationButton = undefined; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │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:"); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯