╭ changed ───────────╮ │src/ui/Repo/Undo.zig│ ╰────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 96 .description = shown.description, │ │ 97 .buttons = shown.buttons, │ │ 98 .timestamp = if (record) |value| try formatTimestamp(aa, value.timestamp) else "timestamp unavailable",│ │ 99 - .link = try std.fmt.allocPrint(aa, "ai:{s}", .{url}), │ │100 - .form = try std.fmt.allocPrint(aa, "form:{s}/undo", .{url}), │ │ 99 + .link = try aa.print("ai:{s}", .{url}), │ │100 + .form = try aa.print("form:{s}/undo", .{url}), │ │101 .undone = row_undone, │ │102 }); │ │103 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │154 if (count == 0) return .{ .action = "events", .description = "merged the event history" }; │ │155 const buttons = try aa.dupe(DetailButton, &.{try eventsButton(arena, identity, history_index, count)});│ │156 return .{ │ │157 - .action = try std.fmt.allocPrint(aa, "events ({d})", .{count}), │ │157 + .action = try aa.print("events ({d})", .{count}), │ │158 .description = "updated the event database", │ │159 .buttons = buttons, │ │160 }; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │188 return .{ │ │189 .label = if (target.redo) " what was redone " else " what was undone ", │ │190 .text = if (detail) |value| value.action else try formatRecord(opts, arena, core, target.record),│ │191 - .link = try std.fmt.allocPrint(arena.allocator(), "a:{s}", .{try route.toUrl(arena)}), │ │191 + .link = try arena.allocator().print("a:{s}", .{try route.toUrl(arena)}), │ │192 }; │ │193 } │ │194 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │199 const route = ui.RoutablePage.repoEventsRoute(identity, .active, null, "", history_index) orelse return error.RouteTooLong;│ │200 return .{ │ │201 .label = " events ", │ │202 - .text = try std.fmt.allocPrint(aa, "view events ({d})", .{count}), │ │203 - .link = try std.fmt.allocPrint(aa, "a:{s}", .{try route.toUrl(arena)}), │ │202 + .text = try aa.print("view events ({d})", .{count}), │ │203 + .link = try aa.print("a:{s}", .{try route.toUrl(arena)}), │ │204 }; │ │205 } │ │206 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │241 │ │242 const action = if (removed) "removed" else if (created) "created" else "changed"; │ │243 try buttons.append(aa, .{ │ │244 - .label = try std.fmt.allocPrint(aa, " {s} {s} ", .{ if (head) "branch" else "tag", action }), │ │244 + .label = try aa.print(" {s} {s} ", .{ if (head) "branch" else "tag", action }), │ │245 .text = try aa.dupe(u8, name), │ │246 - .link = if (route) |value| try std.fmt.allocPrint(aa, "a:{s}", .{try value.toUrl(arena)}) else null,│ │246 + .link = if (route) |value| try aa.print("a:{s}", .{try value.toUrl(arena)}) else null, │ │247 }); │ │248 } │ │249 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │315 const month = year.calculateMonthDay(); │ │316 const day = seconds.getDaySeconds(); │ │317 const months = [_][]const u8{ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; │ │318 - return std.fmt.allocPrint(aa, "{s} {d}, {d}, {d:0>2}:{d:0>2}:{d:0>2} UTC", .{ months[month.month.numeric() - 1], month.day_index + 1, year.year, day.getHoursIntoDay(), day.getMinutesIntoHour(), day.getSecondsIntoMinute() });│ │318 + return aa.print("{s} {d}, {d}, {d:0>2}:{d:0>2}:{d:0>2} UTC", .{ months[month.month.numeric() - 1], month.day_index + 1, year.year, day.getHoursIntoDay(), day.getMinutesIntoHour(), day.getSecondsIntoMinute() }); │ │319 } │ │320 │ │321 pub fn execute(io: std.Io, allocator: std.mem.Allocator, source: ui.RepoSource, index: u64) !void { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │404 var header = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .horiz }); │ │405 errdefer header.deinit(allocator); │ │406 const route = ui.RoutablePage.repoUndoClearRoute(data.identity) orelse return error.RouteTooLong; │ │407 - const link = try std.fmt.allocPrint(session.page_arena.allocator(), "a:{s}", .{try route.toUrl(session.page_arena)});│ │407 + const link = try session.page_arena.allocator().print("a:{s}", .{try route.toUrl(session.page_arena)}); │ │408 try addText(allocator, &header, "clear undo history", link, .single); │ │409 header.getFocus().child_id = header.children.keys()[0]; │ │410 // a row taller than the header, leaving a blank line beneath it │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │432 } │ │433 if (data.next) |next| { │ │434 const route = ui.RoutablePage.repoUndoRoute(data.identity, next) orelse return error.RouteTooLong; │ │435 - try addText(allocator, &rows, "next →", try std.fmt.allocPrint(session.page_arena.allocator(), "a:{s}", .{try route.toUrl(session.page_arena)}), .hidden);│ │435 + try addText(allocator, &rows, "next →", try session.page_arena.allocator().print("a:{s}", .{try route.toUrl(session.page_arena)}), .hidden); │ │436 } │ │437 if (data.items.len == 0) try addText(allocator, &rows, "no undo history", null, .hidden); │ │438 rows.getFocus().child_id = rows.children.keys()[0]; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │467 var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .round_corners = true, .direction = .vert }); │ │468 errdefer box.deinit(allocator); │ │469 const route = ui.RoutablePage.repoUndoClearRoute(data.identity) orelse return error.RouteTooLong; │ │470 - box.getFocus().kind = .{ .custom = try std.fmt.allocPrint(session.page_arena.allocator(), "form:{s}", .{try route.toUrl(session.page_arena)}) };│ │470 + box.getFocus().kind = .{ .custom = try session.page_arena.allocator().print("form:{s}", .{try route.toUrl(session.page_arena)}) }; │ │471 │ │472 var prompt = try wgt.Text.init(allocator, "are you sure?"); │ │473 errdefer prompt.deinit(allocator); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │565 } else for (item.buttons) |detail_button| { │ │566 try addLabeled(allocator, details, detail_button.label, detail_button.text, detail_button.link); │ │567 } │ │568 - if (failure) |message| try addText(allocator, details, try std.fmt.allocPrint(self.session.page_arena.allocator(), "error: {s}", .{message}), null, .single);│ │568 + if (failure) |message| try addText(allocator, details, try self.session.page_arena.allocator().print("error: {s}", .{message}), null, .single); │ │569 self.shown_failure = failure; │ │570 details.getFocus().kind = if (enabled) .{ .custom = item.form } else .container; │ │571 details.getFocus().child_id = details.children.keys()[0]; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯