authorgravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2019-11-11 01:32:52+11:00
committergravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2019-11-25 09:26:32+11:00
log01b2a56225038537f525f52b0d9c821ffa77b90b
treef9d84b248c0576d20bc66b782a912d46c735ff8b
parent52645d06e1f3e46ac0d1d3a3441e1e8aa669fba9
signaturelock-open Commit is signed but in an unrecognized format.

std: move auto_align constant to top of comptime function

At a later point in time this might be made into a parameter

1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/fifo.zig+2-2
......@@ -10,6 +10,8 @@ const assert = debug.assert;
1010const testing = std.testing;
1111
1212pub fn FixedSizeFifo(comptime T: type) type {
13 const autoalign = false;
14
1315 return struct {
1416 allocator: *Allocator,
1517 buf: []T,
......@@ -107,8 +109,6 @@ pub fn FixedSizeFifo(comptime T: type) type {
107109 return self.readableSliceMut(offset);
108110 }
109111
110 const autoalign = false;
111
112112 /// Discard first `count` bytes of readable data
113113 pub fn discard(self: *Self, count: usize) void {
114114 assert(count <= self.count);