From 01b2a56225038537f525f52b0d9c821ffa77b90b Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 11 Nov 2019 01:32:52 +1100 Subject: [PATCH] std: move auto_align constant to top of comptime function At a later point in time this might be made into a parameter --- lib/std/fifo.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/fifo.zig b/lib/std/fifo.zig index 7cf3f9e9060d28c90f0088abeb6a5a01d86d2f7d..e357e23494b38c67769d0ebeb823ad4afbf8a0ad 100644 --- a/lib/std/fifo.zig +++ b/lib/std/fifo.zig @@ -10,6 +10,8 @@ const assert = debug.assert; const testing = std.testing; pub fn FixedSizeFifo(comptime T: type) type { + const autoalign = false; + return struct { allocator: *Allocator, buf: []T, @@ -107,8 +109,6 @@ pub fn FixedSizeFifo(comptime T: type) type { return self.readableSliceMut(offset); } - const autoalign = false; - /// Discard first `count` bytes of readable data pub fn discard(self: *Self, count: usize) void { assert(count <= self.count); -- 2.54.0