summaryrefslogtreecommitdiff
path: root/sqlite.zig
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sqlite.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/sqlite.zig b/sqlite.zig
index 3759884..8477151 100644
--- a/sqlite.zig
+++ b/sqlite.zig
@@ -1349,7 +1349,7 @@ pub fn Iterator(comptime Type: type) type {
1349 if (!comptime isStruct(@TypeOf(options))) { 1349 if (!comptime isStruct(@TypeOf(options))) {
1350 @compileError("options passed to readPointer must be a struct"); 1350 @compileError("options passed to readPointer must be a struct");
1351 } 1351 }
1352 if (!comptime std.meta.trait.hasField("allocator")(@TypeOf(options))) { 1352 if (!@hasField(@TypeOf(options), "allocator")) {
1353 @compileError("options passed to readPointer must have an allocator field"); 1353 @compileError("options passed to readPointer must have an allocator field");
1354 } 1354 }
1355 1355
@@ -1448,13 +1448,13 @@ pub fn Iterator(comptime Type: type) type {
1448 1448
1449 return switch (FieldType) { 1449 return switch (FieldType) {
1450 Blob => blk: { 1450 Blob => blk: {
1451 if (!comptime std.meta.trait.hasField("allocator")(@TypeOf(options))) { 1451 if (!@hasField(@TypeOf(options), "allocator")) {
1452 @compileError("options passed to readPointer must have an allocator field when reading a Blob"); 1452 @compileError("options passed to readPointer must have an allocator field when reading a Blob");
1453 } 1453 }
1454 break :blk try self.readBytes(Blob, options.allocator, i, .Blob); 1454 break :blk try self.readBytes(Blob, options.allocator, i, .Blob);
1455 }, 1455 },
1456 Text => blk: { 1456 Text => blk: {
1457 if (!comptime std.meta.trait.hasField("allocator")(@TypeOf(options))) { 1457 if (!@hasField(@TypeOf(options), "allocator")) {
1458 @compileError("options passed to readField must have an allocator field when reading a Text"); 1458 @compileError("options passed to readField must have an allocator field when reading a Text");
1459 } 1459 }
1460 break :blk try self.readBytes(Text, options.allocator, i, .Text); 1460 break :blk try self.readBytes(Text, options.allocator, i, .Text);