From 41f71d845e7d2102fb925d89ee583592fb48ffa7 Mon Sep 17 00:00:00 2001 From: Vincent Rischmann Date: Sun, 3 Jan 2021 14:48:08 +0100 Subject: convert {} to {s} or {d} --- sqlite.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sqlite.zig') diff --git a/sqlite.zig b/sqlite.zig index a3a6e8e..2c0a5d6 100644 --- a/sqlite.zig +++ b/sqlite.zig @@ -160,9 +160,9 @@ pub const Db = struct { fn getPragmaQuery(comptime buf: []u8, comptime name: []const u8, comptime arg: anytype) []const u8 { return if (arg.len == 1) blk: { - break :blk try std.fmt.bufPrint(buf, "PRAGMA {} = {}", .{ name, arg[0] }); + break :blk try std.fmt.bufPrint(buf, "PRAGMA {s} = {s}", .{ name, arg[0] }); } else blk: { - break :blk try std.fmt.bufPrint(buf, "PRAGMA {}", .{name}); + break :blk try std.fmt.bufPrint(buf, "PRAGMA {s}", .{name}); }; } @@ -1379,7 +1379,7 @@ test "sqlite: statement iterator" { var expected_rows = std.ArrayList(TestUser).init(allocator); var i: usize = 0; while (i < 20) : (i += 1) { - const name = try std.fmt.allocPrint(allocator, "Vincent {}", .{i}); + const name = try std.fmt.allocPrint(allocator, "Vincent {d}", .{i}); const user = TestUser{ .id = i, .name = name, .age = i + 200, .weight = @intToFloat(f32, i + 200) }; try expected_rows.append(user); -- cgit v1.2.3