treesummaryrefslogcommitdiff
diff options
context:
space:
mode:
-rw-r--r--git.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/git.zig b/git.zig
index 07be390..a27ef67 100644
--- a/git.zig
+++ b/git.zig
@@ -122,15 +122,15 @@ const PackFile = struct {
while (try packIt.next()) |f| {
if (std.mem.endsWith(u8, f.name, ".idx")) {
const idxFilename = f.name;
- var pckFilename = try std.BoundedArray(u8, std.fs.max_path_bytes).init(0);
- try std.fmt.format(
- pckFilename.writer(),
+ var pckFilenameBuf: [std.fs.max_path_bytes]u8 = undefined;
+ const pckFilename = try std.fmt.bufPrint(
+ &pckFilenameBuf,
"{s}.pack",
.{idxFilename[0 .. idxFilename.len - 4]},
);
self.idxFile = try packDir.openFile(idxFilename, .{});
- self.pckFile = try packDir.openFile(pckFilename.constSlice(), .{});
+ self.pckFile = try packDir.openFile(pckFilename, .{});
try self.parseIndex();