╭ changed ───────────────╮ │src/ui/widget/thread.zig│ ╰────────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │122 │ │123 fn revisionSummary(allocator: std.mem.Allocator, revision_maybe: ?evt.Patch.Revision) ![]const u8 { │ │124 const revision = revision_maybe orelse return "(none)"; │ │125 - return std.fmt.allocPrint(allocator, "squash {s}\nsource {s}", .{ revision.squash_oid, revision.source_oid });│ │125 + return allocator.print("squash {s}\nsource {s}", .{ revision.squash_oid, revision.source_oid }); │ │126 } │ │127 │ │128 fn readFieldOid( │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────╮ │198 const key = try pair.key_cursor.readBytesAlloc(aa, null); │ │199 const space = std.mem.indexOfScalar(u8, key, ' ') orelse continue;│ │200 const label = key[0..space]; │ │201 - if (labels.getLastOrNull()) |last| { │ │201 + if (labels.last()) |last| { │ │202 if (std.mem.eql(u8, last, label)) continue; │ │203 } │ │204 try labels.append(aa, label); │ ╰───────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │645 │ │646 fn entryStatus(entry: Entry) Status { │ │647 if (comptime has_status) return Data.statusKind(entry.record.event);│ │648 - return @enumFromInt(0); │ │648 + return @fromBackingInt(@intCast(0)); │ │649 } │ │650 │ │651 fn entryDraft(entry: Entry) bool { │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │695 fn listLink(page_arena: *std.heap.ArenaAllocator, identity: []const u8, status: Status, label: []const u8, id: []const u8, search: []const u8) ![]const u8 {│ │696 var route = listRoute(identity, status, label, id) orelse return error.RouteTooLong; │ │697 if (search.len != 0) route = route.withSearch(search) orelse return error.RouteTooLong; │ │698 - return std.fmt.allocPrint(page_arena.allocator(), "a:{s}", .{try route.toUrl(page_arena)}); │ │698 + return page_arena.allocator().print("a:{s}", .{try route.toUrl(page_arena)}); │ │699 } │ │700 │ │701 fn labelLink(page_arena: *std.heap.ArenaAllocator, identity: []const u8, status: Status, label: []const u8, search: []const u8) ![]const u8 { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │735 if (supports_forks and self.session.data.current_page.parent() == .fork) { │ │736 // the fork page's own tabs show the diff and commits │ │737 const route = ui.RoutablePage.repoPatchesRoute(self.data.identity, .open, "", entry.id) orelse return error.RouteTooLong; │ │738 - try addToolButton(allocator, row, "view on target repo", "", try std.fmt.allocPrint(pa, "a:{s}", .{try route.toUrl(self.session.page_arena)}));│ │738 + try addToolButton(allocator, row, "view on target repo", "", try pa.print("a:{s}", .{try route.toUrl(self.session.page_arena)})); │ │739 } else if (supports_forks) { │ │740 if (try Data.diffRoute(self.data.identity, entry)) |route| { │ │741 - try addToolButton(allocator, row, "view diff", "", try std.fmt.allocPrint(pa, "a:{s}", .{try route.toUrl(self.session.page_arena)})); │ │741 + try addToolButton(allocator, row, "view diff", "", try pa.print("a:{s}", .{try route.toUrl(self.session.page_arena)})); │ │742 } │ │743 if (try Data.commitsRoute(self.data.identity, entry)) |route| { │ │744 - const label = if (entry.commit_count) |count| try std.fmt.allocPrint(pa, "view commits ({d})", .{count}) else "view commits"; │ │745 - try addToolButton(allocator, row, label, "", try std.fmt.allocPrint(pa, "a:{s}", .{try route.toUrl(self.session.page_arena)})); │ │744 + const label = if (entry.commit_count) |count| try pa.print("view commits ({d})", .{count}) else "view commits"; │ │745 + try addToolButton(allocator, row, label, "", try pa.print("a:{s}", .{try route.toUrl(self.session.page_arena)})); │ │746 } │ │747 } │ │748 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │755 if (comptime supports_merge) { │ │756 if (Data.canMerge(entry, self.session)) { │ │757 const route = mergeRoute(self.data.identity, entry.id) orelse return error.RouteTooLong; │ │758 - try addToolButton(allocator, row, "merge", mergeBottomLabel(entry.mergeability.status()), try std.fmt.allocPrint(pa, "a:{s}", .{try route.toUrl(self.session.page_arena)}));│ │758 + try addToolButton(allocator, row, "merge", mergeBottomLabel(entry.mergeability.status()), try pa.print("a:{s}", .{try route.toUrl(self.session.page_arena)})); │ │759 } │ │760 } │ │761 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │762 if (supports_drafts and entryDraft(entry)) { │ │763 const route = publishRoute(self.data.identity, entry.id) orelse return error.RouteTooLong; │ │764 - try addToolButton(allocator, row, "publish", "", try std.fmt.allocPrint(pa, "a:{s}", .{try route.toUrl(self.session.page_arena)})); │ │764 + try addToolButton(allocator, row, "publish", "", try pa.print("a:{s}", .{try route.toUrl(self.session.page_arena)})); │ │765 const edit_route = ui.RoutablePage.repoThreadEditRoute(kind, self.data.identity, entry.id) orelse return error.RouteTooLong; │ │766 - try addToolButton(allocator, row, "edit", "", try std.fmt.allocPrint(pa, "a:{s}", .{try edit_route.toUrl(self.session.page_arena)}));│ │766 + try addToolButton(allocator, row, "edit", "", try pa.print("a:{s}", .{try edit_route.toUrl(self.session.page_arena)})); │ │767 const remove_route = ui.RoutablePage.repoThreadRemoveRoute(kind, self.data.identity, entry.id, "") orelse return error.RouteTooLong; │ │768 - try addToolButton(allocator, row, "✕", "", try std.fmt.allocPrint(pa, "a:{s}", .{try remove_route.toUrl(self.session.page_arena)})); │ │768 + try addToolButton(allocator, row, "✕", "", try pa.print("a:{s}", .{try remove_route.toUrl(self.session.page_arena)})); │ │769 } else { │ │770 if (!self.session.is_terminal and !entryConflicted(entry)) { │ │771 const label = "add attachment"; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │772 const action = if (self.data.identity.len == 0) │ │773 - try std.fmt.allocPrint(pa, "{s}/{s}:{s}/attach", .{ ui.file_input_prefix, @tagName(kind), entry.id }) │ │773 + try pa.print("{s}/{s}:{s}/attach", .{ ui.file_input_prefix, @tagName(kind), entry.id }) │ │774 else │ │775 - try std.fmt.allocPrint(pa, "{s}/{s}/{s}:{s}/attach", .{ ui.file_input_prefix, self.data.identity, @tagName(kind), entry.id });│ │775 + try pa.print("{s}/{s}/{s}:{s}/attach", .{ ui.file_input_prefix, self.data.identity, @tagName(kind), entry.id }); │ │776 try addToolButton(allocator, row, label, "", action); │ │777 } │ │778 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │779 if (supports_conflicts and entryConflicted(entry)) { │ │780 const route = resolveRoute(self.data.identity, entry.id, "") orelse return error.RouteTooLong; │ │781 - try addToolButton(allocator, row, "resolve conflict", "", try std.fmt.allocPrint(pa, "a:{s}", .{try route.toUrl(self.session.page_arena)}));│ │781 + try addToolButton(allocator, row, "resolve conflict", "", try pa.print("a:{s}", .{try route.toUrl(self.session.page_arena)})); │ │782 } else { │ │783 if (has_status) { │ │784 if (statusChange(entryStatus(entry))) |change| { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │785 const route = ui.RoutablePage.repoThreadCommentsRoute(kind, self.data.identity, entry.id, 0) orelse return error.RouteTooLong; │ │786 - row.getFocus().kind = .{ .custom = try std.fmt.allocPrint(pa, "form:{s}/{s}", .{ try route.toUrl(self.session.page_arena), change.action }) };│ │786 + row.getFocus().kind = .{ .custom = try pa.print("form:{s}/{s}", .{ try route.toUrl(self.session.page_arena), change.action }) }; │ │787 try addToolButton(allocator, row, change.action, "", "submit"); │ │788 } │ │789 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯