From 75f1a04943cdf06b66fc7f991b459c31ae23a6ac Mon Sep 17 00:00:00 2001 From: Vincent Rischmann Date: Thu, 29 Oct 2020 20:28:20 +0100 Subject: use an anonymous struct now that the compiler is fixed --- sqlite.zig | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'sqlite.zig') diff --git a/sqlite.zig b/sqlite.zig index d140e56..d3df1a4 100644 --- a/sqlite.zig +++ b/sqlite.zig @@ -555,16 +555,9 @@ test "sqlite: statement exec" { // Test with a Bytes struct { - // NOTE(vincent): can't yet pass an anonymous struct, the compiler crashes. - const Params = struct { - id: usize, - name: Bytes, - age: usize, - }; - - try db.exec("INSERT INTO user(id, name, age) VALUES(?, ?, ?)", Params{ + try db.exec("INSERT INTO user(id, name, age) VALUES(?, ?, ?)", .{ .id = 200, - .name = .{ .Text = "hello" }, + .name = Bytes{ .Text = "hello" }, .age = 20, }); } -- cgit v1.2.3