╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1063 break :blk out.written(); │ │1064 }, │ │1065 .user_forks => |u| if (u.start == 0) │ │1066 - try std.fmt.allocPrint(arena.allocator(), "/{s}/forks", .{u.name.slice()}) │ │1066 + try arena.allocator().print("/{s}/forks", .{u.name.slice()}) │ │1067 else │ │1068 - try std.fmt.allocPrint(arena.allocator(), "/{s}/forks/" ++ start_seg ++ "{d}", .{ u.name.slice(), u.start }), │ │1069 - .user_repo_new => |name| try std.fmt.allocPrint(arena.allocator(), "/{s}/repo/new", .{name.slice()}), │ │1070 - .user_user_new => |name| try std.fmt.allocPrint(arena.allocator(), "/{s}/user/new", .{name.slice()}), │ │1071 - .user_user => |name| try std.fmt.allocPrint(arena.allocator(), "/{s}/user", .{name.slice()}), │ │1068 + try arena.allocator().print("/{s}/forks/" ++ start_seg ++ "{d}", .{ u.name.slice(), u.start }), │ │1069 + .user_repo_new => |name| try arena.allocator().print("/{s}/repo/new", .{name.slice()}), │ │1070 + .user_user_new => |name| try arena.allocator().print("/{s}/user/new", .{name.slice()}), │ │1071 + .user_user => |name| try arena.allocator().print("/{s}/user", .{name.slice()}), │ │1072 .repo_files => |f| blk: { │ │1073 const prefix = try repoUrlPrefix(arena, f.name.slice()); │ │1074 if (f.ref_kind == null and f.patchrev_id.len == 0 and f.find.len == 0 and f.line == 0) break :blk if (prefix.len == 0) "/" else prefix;│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1113 }, │ │1114 .repo_issues => |i| blk: { │ │1115 const prefix = try repoUrlPrefix(arena, i.name.slice()); │ │1116 - if (i.view == .edit) break :blk try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ issue_seg ++ "{s}/edit", .{ prefix, i.selected.slice() }); │ │1117 - if (i.view == .description) break :blk try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ issue_seg ++ "{s}/description", .{ prefix, i.selected.slice() }); │ │1116 + if (i.view == .edit) break :blk try arena.allocator().print("{s}/" ++ issue_seg ++ "{s}/edit", .{ prefix, i.selected.slice() }); │ │1117 + if (i.view == .description) break :blk try arena.allocator().print("{s}/" ++ issue_seg ++ "{s}/description", .{ prefix, i.selected.slice() }); │ │1118 if (i.view == .resolve) break :blk if (i.theirs.len == 0) │ │1119 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ issue_seg ++ "{s}/resolve", .{ prefix, i.selected.slice() }) │ │1119 + try arena.allocator().print("{s}/" ++ issue_seg ++ "{s}/resolve", .{ prefix, i.selected.slice() }) │ │1120 else │ │1121 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ issue_seg ++ "{s}/" ++ theirs_seg ++ "{s}/resolve", .{ prefix, i.selected.slice(), i.theirs.slice() }); │ │1121 + try arena.allocator().print("{s}/" ++ issue_seg ++ "{s}/" ++ theirs_seg ++ "{s}/resolve", .{ prefix, i.selected.slice(), i.theirs.slice() }); │ │1122 if (i.view == .new_comment) break :blk if (i.comment.len == 0) │ │1123 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ issue_seg ++ "{s}/new", .{ prefix, i.selected.slice() }) │ │1123 + try arena.allocator().print("{s}/" ++ issue_seg ++ "{s}/new", .{ prefix, i.selected.slice() }) │ │1124 else │ │1125 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ issue_seg ++ "{s}/" ++ comment_seg ++ "{s}/new", .{ prefix, i.selected.slice(), i.comment.slice() }); │ │1126 - if (i.view == .edit_comment) break :blk try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ issue_seg ++ "{s}/" ++ comment_seg ++ "{s}/edit", .{ prefix, i.selected.slice(), i.comment.slice() });│ │1125 + try arena.allocator().print("{s}/" ++ issue_seg ++ "{s}/" ++ comment_seg ++ "{s}/new", .{ prefix, i.selected.slice(), i.comment.slice() }); │ │1126 + if (i.view == .edit_comment) break :blk try arena.allocator().print("{s}/" ++ issue_seg ++ "{s}/" ++ comment_seg ++ "{s}/edit", .{ prefix, i.selected.slice(), i.comment.slice() }); │ │1127 if (i.view == .remove) break :blk if (i.comment.len == 0) │ │1128 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ issue_seg ++ "{s}/remove", .{ prefix, i.selected.slice() }) │ │1128 + try arena.allocator().print("{s}/" ++ issue_seg ++ "{s}/remove", .{ prefix, i.selected.slice() }) │ │1129 else │ │1130 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ issue_seg ++ "{s}/" ++ comment_seg ++ "{s}/remove", .{ prefix, i.selected.slice(), i.comment.slice() }); │ │1130 + try arena.allocator().print("{s}/" ++ issue_seg ++ "{s}/" ++ comment_seg ++ "{s}/remove", .{ prefix, i.selected.slice(), i.comment.slice() }); │ │1131 if (i.view == .conflicts) break :blk if (i.selected.len == 0) │ │1132 - try std.fmt.allocPrint(arena.allocator(), "{s}/issues/conflicts", .{prefix}) │ │1132 + try arena.allocator().print("{s}/issues/conflicts", .{prefix}) │ │1133 else │ │1134 - try std.fmt.allocPrint(arena.allocator(), "{s}/issues/" ++ start_seg ++ "{s}/conflicts", .{ prefix, i.selected.slice() }); │ │1134 + try arena.allocator().print("{s}/issues/" ++ start_seg ++ "{s}/conflicts", .{ prefix, i.selected.slice() }); │ │1135 if (i.comment.len != 0) break :blk if (i.comments_start == 0) │ │1136 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ issue_seg ++ "{s}/" ++ comment_seg ++ "{s}", .{ prefix, i.selected.slice(), i.comment.slice() }) │ │1136 + try arena.allocator().print("{s}/" ++ issue_seg ++ "{s}/" ++ comment_seg ++ "{s}", .{ prefix, i.selected.slice(), i.comment.slice() }) │ │1137 else │ │1138 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ issue_seg ++ "{s}/" ++ comment_seg ++ "{s}/" ++ start_seg ++ "{d}", .{ prefix, i.selected.slice(), i.comment.slice(), i.comments_start });│ │1138 + try arena.allocator().print("{s}/" ++ issue_seg ++ "{s}/" ++ comment_seg ++ "{s}/" ++ start_seg ++ "{d}", .{ prefix, i.selected.slice(), i.comment.slice(), i.comments_start }); │ │1139 var out: std.Io.Writer.Allocating = .init(arena.allocator()); │ │1140 // the list the thread is selected in stays filtered, so paging │ │1141 // and reloading keep the label and the query │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1151 }, │ │1152 .repo_patches => |p| blk: { │ │1153 const prefix = try repoUrlPrefix(arena, p.name.slice()); │ │1154 - if (p.view == .edit) break :blk try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ patch_seg ++ "{s}/edit", .{ prefix, p.selected.slice() }); │ │1155 - if (p.view == .publish) break :blk try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ patch_seg ++ "{s}/publish", .{ prefix, p.selected.slice() }); │ │1156 - if (p.view == .merge) break :blk try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ patch_seg ++ "{s}/merge", .{ prefix, p.selected.slice() }); │ │1157 - if (p.view == .description) break :blk try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ patch_seg ++ "{s}/description", .{ prefix, p.selected.slice() }); │ │1154 + if (p.view == .edit) break :blk try arena.allocator().print("{s}/" ++ patch_seg ++ "{s}/edit", .{ prefix, p.selected.slice() }); │ │1155 + if (p.view == .publish) break :blk try arena.allocator().print("{s}/" ++ patch_seg ++ "{s}/publish", .{ prefix, p.selected.slice() }); │ │1156 + if (p.view == .merge) break :blk try arena.allocator().print("{s}/" ++ patch_seg ++ "{s}/merge", .{ prefix, p.selected.slice() }); │ │1157 + if (p.view == .description) break :blk try arena.allocator().print("{s}/" ++ patch_seg ++ "{s}/description", .{ prefix, p.selected.slice() }); │ │1158 if (p.view == .resolve) break :blk if (p.theirs.len == 0) │ │1159 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ patch_seg ++ "{s}/resolve", .{ prefix, p.selected.slice() }) │ │1159 + try arena.allocator().print("{s}/" ++ patch_seg ++ "{s}/resolve", .{ prefix, p.selected.slice() }) │ │1160 else │ │1161 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ patch_seg ++ "{s}/" ++ theirs_seg ++ "{s}/resolve", .{ prefix, p.selected.slice(), p.theirs.slice() }); │ │1161 + try arena.allocator().print("{s}/" ++ patch_seg ++ "{s}/" ++ theirs_seg ++ "{s}/resolve", .{ prefix, p.selected.slice(), p.theirs.slice() }); │ │1162 if (p.view == .new_comment) break :blk if (p.comment.len == 0) │ │1163 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ patch_seg ++ "{s}/new", .{ prefix, p.selected.slice() }) │ │1163 + try arena.allocator().print("{s}/" ++ patch_seg ++ "{s}/new", .{ prefix, p.selected.slice() }) │ │1164 else │ │1165 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ patch_seg ++ "{s}/" ++ comment_seg ++ "{s}/new", .{ prefix, p.selected.slice(), p.comment.slice() }); │ │1166 - if (p.view == .edit_comment) break :blk try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ patch_seg ++ "{s}/" ++ comment_seg ++ "{s}/edit", .{ prefix, p.selected.slice(), p.comment.slice() });│ │1165 + try arena.allocator().print("{s}/" ++ patch_seg ++ "{s}/" ++ comment_seg ++ "{s}/new", .{ prefix, p.selected.slice(), p.comment.slice() }); │ │1166 + if (p.view == .edit_comment) break :blk try arena.allocator().print("{s}/" ++ patch_seg ++ "{s}/" ++ comment_seg ++ "{s}/edit", .{ prefix, p.selected.slice(), p.comment.slice() }); │ │1167 if (p.view == .remove) break :blk if (p.comment.len == 0) │ │1168 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ patch_seg ++ "{s}/remove", .{ prefix, p.selected.slice() }) │ │1168 + try arena.allocator().print("{s}/" ++ patch_seg ++ "{s}/remove", .{ prefix, p.selected.slice() }) │ │1169 else │ │1170 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ patch_seg ++ "{s}/" ++ comment_seg ++ "{s}/remove", .{ prefix, p.selected.slice(), p.comment.slice() }); │ │1170 + try arena.allocator().print("{s}/" ++ patch_seg ++ "{s}/" ++ comment_seg ++ "{s}/remove", .{ prefix, p.selected.slice(), p.comment.slice() }); │ │1171 if (p.view == .conflicts) break :blk if (p.selected.len == 0) │ │1172 - try std.fmt.allocPrint(arena.allocator(), "{s}/patches/conflicts", .{prefix}) │ │1172 + try arena.allocator().print("{s}/patches/conflicts", .{prefix}) │ │1173 else │ │1174 - try std.fmt.allocPrint(arena.allocator(), "{s}/patches/" ++ start_seg ++ "{s}/conflicts", .{ prefix, p.selected.slice() }); │ │1174 + try arena.allocator().print("{s}/patches/" ++ start_seg ++ "{s}/conflicts", .{ prefix, p.selected.slice() }); │ │1175 if (p.comment.len != 0) break :blk if (p.comments_start == 0) │ │1176 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ patch_seg ++ "{s}/" ++ comment_seg ++ "{s}", .{ prefix, p.selected.slice(), p.comment.slice() }) │ │1176 + try arena.allocator().print("{s}/" ++ patch_seg ++ "{s}/" ++ comment_seg ++ "{s}", .{ prefix, p.selected.slice(), p.comment.slice() }) │ │1177 else │ │1178 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ patch_seg ++ "{s}/" ++ comment_seg ++ "{s}/" ++ start_seg ++ "{d}", .{ prefix, p.selected.slice(), p.comment.slice(), p.comments_start });│ │1178 + try arena.allocator().print("{s}/" ++ patch_seg ++ "{s}/" ++ comment_seg ++ "{s}/" ++ start_seg ++ "{d}", .{ prefix, p.selected.slice(), p.comment.slice(), p.comments_start }); │ │1179 var out: std.Io.Writer.Allocating = .init(arena.allocator()); │ │1180 // the list the thread is selected in stays filtered, so paging │ │1181 // and reloading keep the label and the query │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1191 }, │ │1192 .repo_discussions => |t| blk: { │ │1193 const prefix = try repoUrlPrefix(arena, t.name.slice()); │ │1194 - if (t.view == .edit) break :blk try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/edit", .{ prefix, t.selected.slice() }); │ │1195 - if (t.view == .description) break :blk try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/description", .{ prefix, t.selected.slice() }); │ │1194 + if (t.view == .edit) break :blk try arena.allocator().print("{s}/" ++ discuss_seg ++ "{s}/edit", .{ prefix, t.selected.slice() }); │ │1195 + if (t.view == .description) break :blk try arena.allocator().print("{s}/" ++ discuss_seg ++ "{s}/description", .{ prefix, t.selected.slice() }); │ │1196 if (t.view == .new_comment) break :blk if (t.comment.len == 0) │ │1197 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/new", .{ prefix, t.selected.slice() }) │ │1197 + try arena.allocator().print("{s}/" ++ discuss_seg ++ "{s}/new", .{ prefix, t.selected.slice() }) │ │1198 else │ │1199 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/" ++ comment_seg ++ "{s}/new", .{ prefix, t.selected.slice(), t.comment.slice() }); │ │1200 - if (t.view == .edit_comment) break :blk try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/" ++ comment_seg ++ "{s}/edit", .{ prefix, t.selected.slice(), t.comment.slice() });│ │1199 + try arena.allocator().print("{s}/" ++ discuss_seg ++ "{s}/" ++ comment_seg ++ "{s}/new", .{ prefix, t.selected.slice(), t.comment.slice() }); │ │1200 + if (t.view == .edit_comment) break :blk try arena.allocator().print("{s}/" ++ discuss_seg ++ "{s}/" ++ comment_seg ++ "{s}/edit", .{ prefix, t.selected.slice(), t.comment.slice() }); │ │1201 if (t.view == .remove) break :blk if (t.comment.len == 0) │ │1202 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/remove", .{ prefix, t.selected.slice() }) │ │1202 + try arena.allocator().print("{s}/" ++ discuss_seg ++ "{s}/remove", .{ prefix, t.selected.slice() }) │ │1203 else │ │1204 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/" ++ comment_seg ++ "{s}/remove", .{ prefix, t.selected.slice(), t.comment.slice() }); │ │1204 + try arena.allocator().print("{s}/" ++ discuss_seg ++ "{s}/" ++ comment_seg ++ "{s}/remove", .{ prefix, t.selected.slice(), t.comment.slice() }); │ │1205 if (t.comment.len != 0) break :blk if (t.comments_start == 0) │ │1206 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/" ++ comment_seg ++ "{s}", .{ prefix, t.selected.slice(), t.comment.slice() }) │ │1206 + try arena.allocator().print("{s}/" ++ discuss_seg ++ "{s}/" ++ comment_seg ++ "{s}", .{ prefix, t.selected.slice(), t.comment.slice() }) │ │1207 else │ │1208 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/" ++ comment_seg ++ "{s}/" ++ start_seg ++ "{d}", .{ prefix, t.selected.slice(), t.comment.slice(), t.comments_start });│ │1208 + try arena.allocator().print("{s}/" ++ discuss_seg ++ "{s}/" ++ comment_seg ++ "{s}/" ++ start_seg ++ "{d}", .{ prefix, t.selected.slice(), t.comment.slice(), t.comments_start }); │ │1209 var out: std.Io.Writer.Allocating = .init(arena.allocator()); │ │1210 // the list the thread is selected in stays filtered, so paging │ │1211 // and reloading keep the label and the query │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1222 .repo_undo => |u| blk: { │ │1223 const prefix = try repoUrlPrefix(arena, u.name.slice()); │ │1224 break :blk if (u.clear) │ │1225 - try std.fmt.allocPrint(arena.allocator(), "{s}/undo/clear", .{prefix}) │ │1225 + try arena.allocator().print("{s}/undo/clear", .{prefix}) │ │1226 else if (u.index) |index| │ │1227 - try std.fmt.allocPrint(arena.allocator(), "{s}/undo/{d}", .{ prefix, index })│ │1227 + try arena.allocator().print("{s}/undo/{d}", .{ prefix, index }) │ │1228 else │ │1229 - try std.fmt.allocPrint(arena.allocator(), "{s}/undo", .{prefix}); │ │1229 + try arena.allocator().print("{s}/undo", .{prefix}); │ │1230 }, │ │1231 .repo_events => |e| blk: { │ │1232 const prefix = try repoUrlPrefix(arena, e.name.slice()); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1233 - const moment = if (e.moment) |value| try std.fmt.allocPrint(arena.allocator(), "/moment:{d}", .{value}) else ""; │ │1233 + const moment = if (e.moment) |value| try arena.allocator().print("/moment:{d}", .{value}) else ""; │ │1234 break :blk if (e.kind) |kind| │ │1235 - try std.fmt.allocPrint(arena.allocator(), "{s}/event:{s}/kind:{s}{s}", .{ prefix, e.selected.slice(), @tagName(kind), moment })│ │1235 + try arena.allocator().print("{s}/event:{s}/kind:{s}{s}", .{ prefix, e.selected.slice(), @tagName(kind), moment }) │ │1236 else │ │1237 - try std.fmt.allocPrint(arena.allocator(), "{s}/events/{s}{s}", .{ prefix, @tagName(e.view), moment }); │ │1237 + try arena.allocator().print("{s}/events/{s}{s}", .{ prefix, @tagName(e.view), moment }); │ │1238 }, │ │1239 - .repo_repo_new => |name| try std.fmt.allocPrint(arena.allocator(), "{s}/repo/new", .{try repoUrlPrefix(arena, name.slice())}), │ │1240 - .repo_user_new => |name| try std.fmt.allocPrint(arena.allocator(), "{s}/user/new", .{try repoUrlPrefix(arena, name.slice())}), │ │1241 - .repo_repo => |name| try std.fmt.allocPrint(arena.allocator(), "{s}/repo", .{try repoUrlPrefix(arena, name.slice())}), │ │1242 - .repo_user => |name| try std.fmt.allocPrint(arena.allocator(), "{s}/user", .{try repoUrlPrefix(arena, name.slice())}), │ │1243 - .fork_patch => |f| try std.fmt.allocPrint(arena.allocator(), "/{s}+{s}", .{ f.name.slice(), f.id.slice() }), │ │1239 + .repo_repo_new => |name| try arena.allocator().print("{s}/repo/new", .{try repoUrlPrefix(arena, name.slice())}), │ │1240 + .repo_user_new => |name| try arena.allocator().print("{s}/user/new", .{try repoUrlPrefix(arena, name.slice())}), │ │1241 + .repo_repo => |name| try arena.allocator().print("{s}/repo", .{try repoUrlPrefix(arena, name.slice())}), │ │1242 + .repo_user => |name| try arena.allocator().print("{s}/user", .{try repoUrlPrefix(arena, name.slice())}), │ │1243 + .fork_patch => |f| try arena.allocator().print("/{s}+{s}", .{ f.name.slice(), f.id.slice() }), │ │1244 .fork_diff => |d| blk: { │ │1245 var out: std.Io.Writer.Allocating = .init(arena.allocator()); │ │1246 try out.writer.print("/{s}+{s}/diff", .{ d.fork.name.slice(), d.fork.id.slice() }); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1265 if (c.message) try out.writer.print("/" ++ message_seg, .{}); │ │1266 break :blk out.written(); │ │1267 }, │ │1268 - .fork_repo_new => |f| try std.fmt.allocPrint(arena.allocator(), "/{s}+{s}/repo/new", .{ f.name.slice(), f.id.slice() }),│ │1269 - .fork_user_new => |f| try std.fmt.allocPrint(arena.allocator(), "/{s}+{s}/user/new", .{ f.name.slice(), f.id.slice() }),│ │1270 - .fork_user => |f| try std.fmt.allocPrint(arena.allocator(), "/{s}+{s}/user", .{ f.name.slice(), f.id.slice() }), │ │1268 + .fork_repo_new => |f| try arena.allocator().print("/{s}+{s}/repo/new", .{ f.name.slice(), f.id.slice() }), │ │1269 + .fork_user_new => |f| try arena.allocator().print("/{s}+{s}/user/new", .{ f.name.slice(), f.id.slice() }), │ │1270 + .fork_user => |f| try arena.allocator().print("/{s}+{s}/user", .{ f.name.slice(), f.id.slice() }), │ │1271 }; │ │1272 } │ │1273 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────╮ │1364 // when the identity is elided. │ │1365 fn repoUrlPrefix(arena: *std.heap.ArenaAllocator, identity: []const u8) ![]const u8 {│ │1366 if (identity.len == 0) return ""; │ │1367 - return std.fmt.allocPrint(arena.allocator(), "/{s}", .{identity}); │ │1367 + return arena.allocator().print("/{s}", .{identity}); │ │1368 } │ │1369 │ │1370 // true when the page builds at its content height on the web, letting the │ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────╮ │2501 } │ │2502 │ │2503 fn showCopyableText(io: std.Io, copyable_text: []const u8) !void { │ │2504 - const tty: ?std.Io.File = if (builtin.os.tag == .windows) │ │2504 + const tty: ?std.Io.File = if (builtin.target.os.tag == .windows) │ │2505 null │ │2506 else │ │2507 try std.Io.Dir.cwd().openFile(io, "/dev/tty", .{ .mode = .read_write });│ ╰──────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2608 // an in-page tab's base route, or the exact current route when it is selected │ │2609 pub fn inPageTabLink(session: *Session, route: RoutablePage, selected: bool) ![]const u8 { │ │2610 const target = if (selected) session.data.current_page else route; │ │2611 - return std.fmt.allocPrint(session.page_arena.allocator(), "{s}{s}", .{ in_page_link_prefix, try target.toUrl(session.page_arena) });│ │2611 + return session.page_arena.allocator().print("{s}{s}", .{ in_page_link_prefix, try target.toUrl(session.page_arena) }); │ │2612 } │ │2613 │ │2614 // a button the web renderer covers with a file picker that posts the chosen │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯