Skip to content

Commit 2ebe5b0

Browse files
kcbannerhazeycode
andauthored
Upgrade to Zig 0.15.x (#4)
* handle: fixup format * update minimum_zig_version to 0.15.1 --------- Co-authored-by: Chris Heyes <[email protected]>
1 parent 7829cf0 commit 2ebe5b0

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

build.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.name = .zpool,
33
.fingerprint = 0xfb9579e9d9bd6e6c,
44
.version = "0.11.0-dev",
5-
.minimum_zig_version = "0.14.0",
5+
.minimum_zig_version = "0.15.1",
66
.paths = .{
77
"build.zig",
88
"build.zig.zon",

src/handle.zig

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,7 @@ pub fn Handle(
142142
}
143143
};
144144

145-
pub fn format(
146-
self: Self,
147-
comptime fmt: []const u8,
148-
options: std.fmt.FormatOptions,
149-
writer: anytype,
150-
) !void {
151-
_ = fmt;
152-
_ = options;
145+
pub fn format(self: Self, writer: *std.io.Writer) std.io.Writer.Error!void {
153146
const n = @typeName(Resource);
154147
const a = self.addressable();
155148
return writer.print("{s}[{}#{}]", .{ n, a.index, a.cycle });
@@ -273,6 +266,6 @@ test "Handle.format()" {
273266
const h = H.init(0, 1);
274267

275268
var buffer = [_]u8{0} ** 128;
276-
const s = try bufPrint(buffer[0..], "{}", .{h});
269+
const s = try bufPrint(buffer[0..], "{f}", .{h});
277270
try expectEqualStrings("handle.test.Handle.format().Foo[0#1]", s);
278271
}

0 commit comments

Comments
 (0)