╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─────────────╮ │src/ui/Repo/Events.zig│ ╰──────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │637 } │ │638 │ │639 pub fn empty(aa: std.mem.Allocator, failure: ?[]const u8) !Header { │ │640 - return .{ .sync_status = if (failure) |name| try std.fmt.allocPrint(aa, "error: {s}", .{name}) else nothing };│ │640 + return .{ .sync_status = if (failure) |name| try aa.print("error: {s}", .{name}) else nothing }; │ │641 } │ │642 │ │643 pub fn remote() Header { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │694 errdefer status.deinit(allocator); │ │695 try box.children.put(allocator, status.getFocus().id, .{ .widget = .{ .text_box = status }, .rect = null, .min_size = null, .flex = .shrink });│ │696 } │ │697 - box.getFocus().child_id = tab_ids[@intFromEnum(data.view)]; │ │698 - return .{ .box = box, .session = session, .tab_ids = tab_ids, .selected_tab = @intFromEnum(data.view), .button_id = button_id }; │ │697 + box.getFocus().child_id = tab_ids[@backingInt(data.view)]; │ │698 + return .{ .box = box, .session = session, .tab_ids = tab_ids, .selected_tab = @backingInt(data.view), .button_id = button_id }; │ │699 } │ │700 │ │701 pub fn deinit(self: *Header.View, allocator: std.mem.Allocator) void { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │845 defer config.deinit(); │ │846 const configured_ssh = if (config.sections.get("core")) |core| core.get("sshcommand") else null;│ │847 const ssh = if (configured_ssh) |command| if (command.len > 0) command else "ssh" else "ssh"; │ │848 - const remote_section = try std.fmt.allocPrint(allocator, "remote.{s}", .{remote_name}); │ │848 + const remote_section = try allocator.print("remote.{s}", .{remote_name}); │ │849 defer allocator.free(remote_section); │ │850 const remote_config = config.sections.get(remote_section) orelse return error.RemoteNotFound; │ │851 const fetch_url = remote_config.get("url") orelse return error.UrlNotFound; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │852 const push_url = remote_config.get("pushurl") orelse fetch_url; │ │853 const loopback_opts = " -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"; │ │854 - const fetch_ssh_command = try std.fmt.allocPrint(allocator, "{s}{s} -o BatchMode=yes -o LogLevel=QUIET", .{ ssh, if (isLoopbackSshUrl(fetch_url)) loopback_opts else "" });│ │854 + const fetch_ssh_command = try allocator.print("{s}{s} -o BatchMode=yes -o LogLevel=QUIET", .{ ssh, if (isLoopbackSshUrl(fetch_url)) loopback_opts else "" }); │ │855 defer allocator.free(fetch_ssh_command); │ │856 - const push_ssh_command = try std.fmt.allocPrint(allocator, "{s}{s} -o BatchMode=yes -o LogLevel=QUIET", .{ ssh, if (isLoopbackSshUrl(push_url)) loopback_opts else "" }); │ │856 + const push_ssh_command = try allocator.print("{s}{s} -o BatchMode=yes -o LogLevel=QUIET", .{ ssh, if (isLoopbackSshUrl(push_url)) loopback_opts else "" }); │ │857 defer allocator.free(push_ssh_command); │ │858 const fetch_transport_opts: xit.net.Opts(repo_opts.ProgressCtx) = .{ .progress_ctx = .{ .message = &message }, .wire = .{ .ssh = .{ .command = fetch_ssh_command } } }; │ │859 const push_transport_opts: xit.net.Opts(repo_opts.ProgressCtx) = .{ .progress_ctx = .{ .message = &message }, .wire = .{ .ssh = .{ .command = push_ssh_command } } }; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │860 │ │861 - const fetch_refspec = try std.fmt.allocPrint(allocator, "+refs/heads/{s}:refs/remotes/{s}/{s}", .{ evt.events_ref.name, remote_name, evt.events_ref.name });│ │861 + const fetch_refspec = try allocator.print("+refs/heads/{s}:refs/remotes/{s}/{s}", .{ evt.events_ref.name, remote_name, evt.events_ref.name }); │ │862 defer allocator.free(fetch_refspec); │ │863 var fetch_opts = fetch_transport_opts; │ │864 fetch_opts.refspecs = &.{fetch_refspec}; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │878 if (remote_oid != null) try evt.mergeEvents(repo_kind, repo_opts, io, allocator, repo, remote_ref); │ │879 try evt.consume(.local, .repo, repo_kind, repo_opts, io, allocator, repo, evt.events_ref, &.{}); │ │880 │ │881 - const push_refspec = try std.fmt.allocPrint(allocator, "refs/heads/{s}:refs/heads/{s}", .{ evt.events_ref.name, evt.events_ref.name });│ │881 + const push_refspec = try allocator.print("refs/heads/{s}:refs/heads/{s}", .{ evt.events_ref.name, evt.events_ref.name }); │ │882 defer allocator.free(push_refspec); │ │883 message.clearRetainingCapacity(); │ │884 repo.push(io, allocator, remote_name, push_refspec, false, push_transport_opts) catch |err| { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────────────╮ │src/ui/Repo/Files.zig│ ╰─────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │399 // a search result shows its file name, with its directory │ │400 // in the bottom label. │ │401 const label = if (data.find != null) │ │402 - std.fs.path.basenamePosix(entry.name) │ │402 + std.Io.Dir.path.basenamePosix(entry.name) │ │403 else if (entry.is_dir) │ │404 - try std.fmt.allocPrint(aa, "{s}/", .{entry.name}) │ │404 + try aa.print("{s}/", .{entry.name}) │ │405 else │ │406 entry.name; │ │407 const bottom_label = if (data.find != null) try resultDirLabel(aa, entry.name) else "";│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │730 const page_arena = self.session.page_arena; │ │731 const path = try childDir(page_arena.allocator(), self.data.dir, entry.name); │ │732 const route = self.data.filesRoute(path, target_start) orelse return error.RouteTooLong; │ │733 - const link = try std.fmt.allocPrint(page_arena.allocator(), "a:{s}", .{try route.toUrl(page_arena)}); │ │733 + const link = try page_arena.allocator().print("a:{s}", .{try route.toUrl(page_arena)}); │ │734 var tb = try wgt.TextBox.init(allocator, label, .{ .border_style = .single, .round_corners = true, .wrap_kind = .none });│ │735 errdefer tb.deinit(allocator); │ │736 tb.getFocus().mode = .all; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────╮ │972 var out: std.ArrayList(u8) = .empty; │ │973 for (lines, 0..) |line, i| { │ │974 if (i != 0) try out.append(arena, '\n'); │ │975 - const num_str = try std.fmt.allocPrint(arena, "{d}", .{start + i + 1});│ │975 + const num_str = try arena.print("{d}", .{start + i + 1}); │ │976 try out.appendSlice(arena, indent[0 .. width - num_str.len]); │ │977 try out.appendSlice(arena, num_str); │ │978 try out.append(arena, ' '); │ ╰────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │991 } │ │992 │ │993 fn isMarkdown(name: []const u8) bool { │ │994 - const extension = std.fs.path.extension(name); │ │994 + const extension = std.Io.Dir.path.extension(name); │ │995 return std.ascii.eqlIgnoreCase(extension, ".md") or std.ascii.eqlIgnoreCase(extension, ".markdown");│ │996 } │ │997 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯