╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─────────╮ │src/ui/NewRepo.zig│ ╰──────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │24 pub fn init(allocator: std.mem.Allocator, session: *ui.Session, route: ui.RoutablePage) !View { │ │25 var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .vert }); │ │26 errdefer box.deinit(allocator); │ │27 - box.getFocus().kind = .{ .custom = try std.fmt.allocPrint(session.page_arena.allocator(), "form:{s}", .{try route.toUrl(session.page_arena)}) };│ │27 + box.getFocus().kind = .{ .custom = try session.page_arena.allocator().print("form:{s}", .{try route.toUrl(session.page_arena)}) }; │ │28 │ │29 const saved_fields = if (session.formFeedback(.repo)) |saved| saved.fields else null; │ │30 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │158 name_input.clear(allocator); │ │159 description_input.clear(allocator); │ │160 │ │161 - const identity = try std.fmt.allocPrint(self.session.page_arena.allocator(), "{s}:{s}", .{ user.event.name, name });│ │161 + const identity = try self.session.page_arena.allocator().print("{s}:{s}", .{ user.event.name, name }); │ │162 try self.session.navigate(ui.RoutablePage.repoFilesRoute(identity, null, "", "", 0) orelse return); │ │163 } │ │164 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────╮ │src/ui/NewUser.zig│ ╰──────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │22 pub fn init(allocator: std.mem.Allocator, session: *ui.Session, route: ui.RoutablePage) !View { │ │23 var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .vert }); │ │24 errdefer box.deinit(allocator); │ │25 - box.getFocus().kind = .{ .custom = try std.fmt.allocPrint(session.page_arena.allocator(), "form:{s}", .{try route.toUrl(session.page_arena)}) };│ │25 + box.getFocus().kind = .{ .custom = try session.page_arena.allocator().print("form:{s}", .{try route.toUrl(session.page_arena)}) }; │ │26 │ │27 const saved_fields = if (session.formFeedback(.user)) |saved| saved.fields else null; │ │28 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │236 // repo's directory rather than the route. │ │237 repo = .{ .event = .{ │ │238 .user_id = "", │ │239 - .name = try arena.allocator().dupe(u8, std.fs.path.basename(local.path)), │ │239 + .name = try arena.allocator().dupe(u8, std.Io.Dir.path.basename(local.path)),│ │240 .description = "", │ │241 } }; │ │242 owner_name = ""; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │468 // the header shows new repo with a login, and new user without one │ │469 // and user only outside local mode, so keep the stack's children │ │470 // 1:1 with the tabs by skipping the same views. │ │471 - const identity = try std.fmt.allocPrint(session.page_arena.allocator(), "{s}:{s}", .{ data.header.owner_name, data.header.name }); │ │471 + const identity = try session.page_arena.allocator().print("{s}:{s}", .{ data.header.owner_name, data.header.name }); │ │472 if (session.data.user_id != null) { │ │473 const route = ui.RoutablePage{ .repo_repo_new = ui.RoutablePage.Array(ui.RoutablePage.repo_route_max_len).from(identity) orelse return error.RouteTooLong };│ │474 var new_repo_view = try ui.NewRepo.View.init(allocator, session, route); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────────╮ │src/ui/Repo/Attachment.zig│ ╰──────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │62 }); │ │63 errdefer tb.deinit(allocator); │ │64 tb.getFocus().mode = .all; │ │65 - tb.getFocus().kind = .{ .custom = try std.fmt.allocPrint(pa, "{s}{s}", .{ ui.raw_link_prefix, try url(session.page_arena, identity, &entry.id) }) };│ │65 + tb.getFocus().kind = .{ .custom = try pa.print("{s}{s}", .{ ui.raw_link_prefix, try url(session.page_arena, identity, &entry.id) }) }; │ │66 try row.children.put(allocator, tb.getFocus().id, .{ .widget = .{ .text_box = tb }, .rect = null, .min_size = null }); │ │67 │ │68 - row.getFocus().kind = .{ .custom = try std.fmt.allocPrint(pa, "form:{s}/attachment:{s}/remove", .{ parent_url, &entry.id }) }; │ │68 + row.getFocus().kind = .{ .custom = try pa.print("form:{s}/attachment:{s}/remove", .{ parent_url, &entry.id }) }; │ │69 var remove = try wgt.TextBox.init(allocator, "✕", .{ .border_style = .single, .round_corners = true, .wrap_kind = .none }); │ │70 errdefer remove.deinit(allocator); │ │71 remove.getFocus().mode = .all; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 98 // the url an attachment's bytes are served from │ │ 99 pub fn url(page_arena: *std.heap.ArenaAllocator, identity: []const u8, id: []const u8) ![]const u8 {│ │100 return if (identity.len == 0) │ │101 - try std.fmt.allocPrint(page_arena.allocator(), "/attachment:{s}", .{id}) │ │101 + try page_arena.allocator().print("/attachment:{s}", .{id}) │ │102 else │ │103 - try std.fmt.allocPrint(page_arena.allocator(), "/{s}/attachment:{s}", .{ identity, id }); │ │103 + try page_arena.allocator().print("/{s}/attachment:{s}", .{ identity, id }); │ │104 } │ │105 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Comment.zig│ ╰───────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │194 errdefer parent.deinit(allocator); │ │195 parent.getFocus().mode = .all; │ │196 const route = commentsRoute(thread_kind, identity, &entry.comment.event.thread_id, &entry.comment.event.parent_id, 0) orelse return error.RouteTooLong; │ │197 - parent.getFocus().kind = .{ .custom = try std.fmt.allocPrint(session.page_arena.allocator(), "a:{s}", .{try route.toUrl(session.page_arena)}) }; │ │197 + parent.getFocus().kind = .{ .custom = try session.page_arena.allocator().print("a:{s}", .{try route.toUrl(session.page_arena)}) }; │ │198 try bar.children.put(allocator, parent.getFocus().id, .{ .widget = .{ .text_box = parent }, .rect = null, .min_size = .{ .width = @max(parent_text.len, " replying to ".len) + 2, .height = null } });│ │199 } │ │200 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │356 var box = try wgt.TextBox.init(allocator, text, .{ .border_style = .single, .round_corners = true, .wrap_kind = .none }); │ │357 errdefer box.deinit(allocator); │ │358 box.getFocus().mode = .all; │ │359 - box.getFocus().kind = .{ .custom = try std.fmt.allocPrint(session.page_arena.allocator(), "a:{s}", .{try route.toUrl(session.page_arena)}) };│ │359 + box.getFocus().kind = .{ .custom = try session.page_arena.allocator().print("a:{s}", .{try route.toUrl(session.page_arena)}) }; │ │360 return box; │ │361 } │ │362 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Commits.zig│ ╰───────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │234 const text, const truncated = try readMessage(repo_kind, repo_opts, aa, commit_object, full_message); │ │235 return .{ │ │236 .oid = try aa.dupe(u8, &commit_object.oid), │ │237 - .parent_oid = if (md.firstParent()) |parent| try aa.dupe(u8, parent) else "0" ** xit.hash.hexLen(repo_opts.hash), │ │237 + .parent_oid = if (md.firstParent()) |parent| try aa.dupe(u8, parent) else &@as([xit.hash.hexLen(repo_opts.hash)]u8, @splat('0')),│ │238 .date = try formatDate(aa, md.timestamp), │ │239 .message = text, │ │240 .message_truncated = truncated, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯