╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──╮ │src/web.zig│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1077 }, │ │1078 } │ │1079 │ │1080 - const location = try std.fmt.allocPrint(allocator, "{s}/{s}:{s}/comment:{s}", .{ parts.repo_base, @tagName(parts.thread_kind), &thread_id_hex, &event_id_hex });│ │1080 + const location = try allocator.print("{s}/{s}:{s}/comment:{s}", .{ parts.repo_base, @tagName(parts.thread_kind), &thread_id_hex, &event_id_hex }); │ │1081 defer allocator.free(location); │ │1082 try request.respond("", .{ │ │1083 .status = .see_other, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1158 const content_type = attachmentContentType(record.name); │ │1159 const encoded_name = try ui.urlEncodeRef(allocator, record.name); │ │1160 defer allocator.free(encoded_name); │ │1161 - const disposition = try std.fmt.allocPrint(allocator, "{s}; filename*=UTF-8''{s}", .{ if (content_type == null) "attachment" else "inline", encoded_name });│ │1161 + const disposition = try allocator.print("{s}; filename*=UTF-8''{s}", .{ if (content_type == null) "attachment" else "inline", encoded_name }); │ │1162 defer allocator.free(disposition); │ │1163 │ │1164 var send_buf: [8192]u8 = undefined; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────╮ │1370 defer allocator.free(body); │ │1371 │ │1372 if (!evt.Comment.fieldsValid(body)) { │ │1373 - const form_location = try std.fmt.allocPrint(allocator, "{s}/edit", .{base});│ │1373 + const form_location = try allocator.print("{s}/edit", .{base}); │ │1374 defer allocator.free(form_location); │ │1375 try request.respond("", .{ │ │1376 .status = .see_other, │ ╰───────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1470 │ │1471 // a draft lives in its author's user repo │ │1472 if (try evt.readForkById(io, allocator, &author_arena, server.users_dir, &user_id, &parts.id)) |fork_record| { │ │1473 - const repo_id = evt.parseEventId(std.fs.path.basename(source.path)) catch return respondRemoveNotFound(request); │ │1473 + const repo_id = evt.parseEventId(std.Io.Dir.path.basename(source.path)) catch return respondRemoveNotFound(request); │ │1474 if (!fork_record.removed and fork_record.event.stage == .draft and std.mem.eql(u8, fork_record.event.repo_id, &repo_id)) {│ │1475 const id = std.fmt.bytesToHex(parts.id, .lower); │ │1476 try fork.remove(io, allocator, server.users_dir, &user_id, &id, author); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1477 │ │1478 - const location = try std.fmt.allocPrint(allocator, "{s}/patches/drafts", .{parts.repo_base});│ │1478 + const location = try allocator.print("{s}/patches/drafts", .{parts.repo_base}); │ │1479 defer allocator.free(location); │ │1480 try request.respond("", .{ │ │1481 .status = .see_other, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1506 } │ │1507 │ │1508 const id = std.fmt.bytesToHex(parts.id, .lower); │ │1509 - const location = try std.fmt.allocPrint(allocator, "{s}/event:{s}/kind:{s}", .{ parts.repo_base, &id, @tagName(parts.kind) });│ │1509 + const location = try allocator.print("{s}/event:{s}/kind:{s}", .{ parts.repo_base, &id, @tagName(parts.kind) }); │ │1510 defer allocator.free(location); │ │1511 try request.respond("", .{ │ │1512 .status = .see_other, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1639 else => unreachable, │ │1640 }; │ │1641 if (!valid) { │ │1642 - const form_location = try std.fmt.allocPrint(allocator, "{s}/edit", .{base}); │ │1642 + const form_location = try allocator.print("{s}/edit", .{base}); │ │1643 defer allocator.free(form_location); │ │1644 if (!evt.titleValid(title)) { │ │1645 return respondThreadFormFailure(request, allocator, host, form_location, requiredTitleFeedback(parts.thread_kind, title, labels, description, target_branch, null));│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1661 .local => unreachable, │ │1662 }; │ │1663 if (!evt.Patch.branchValid(target_branch) or !try request_repo.source.hasBranch(io, allocator, target_branch)) { │ │1664 - const form_location = try std.fmt.allocPrint(allocator, "{s}/edit", .{base}); │ │1664 + const form_location = try allocator.print("{s}/edit", .{base}); │ │1665 defer allocator.free(form_location); │ │1666 return respondThreadFormFailure(request, allocator, host, form_location, patchFeedback(.invalid_target_branch, title, labels, description, target_branch, null));│ │1667 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1668 - const repo_id = evt.parseEventId(std.fs.path.basename(request_repo.source.path)) catch return respondRemoveNotFound(request); │ │1668 + const repo_id = evt.parseEventId(std.Io.Dir.path.basename(request_repo.source.path)) catch return respondRemoveNotFound(request);│ │1669 var admin_repo = try rp.Repo(.xit, evt.admin_repo_opts).open(io, allocator, .{ .path = server.admin_repo_path }); │ │1670 defer admin_repo.deinit(io, allocator); │ │1671 const id = std.fmt.bytesToHex(parts.thread_id, .lower); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1722 else => { │ │1723 if (parts.thread_kind != .patch) return err; │ │1724 const failure = ui.Session.FormFeedback.PatchFailure.fromError(err) orelse return err; │ │1725 - const form_location = try std.fmt.allocPrint(allocator, "{s}/edit", .{base}); │ │1725 + const form_location = try allocator.print("{s}/edit", .{base}); │ │1726 defer allocator.free(form_location); │ │1727 return respondThreadFormFailure(request, allocator, host, form_location, patchFeedback(failure, title, labels, description, target_branch, null));│ │1728 }, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯