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;...@@ -10,6 +10,8 @@ const assert = debug.assert;
10const testing = std.testing;10const testing = std.testing;
1111
12pub fn FixedSizeFifo(comptime T: type) type {12pub fn FixedSizeFifo(comptime T: type) type {
13 const autoalign = false;
14
13 return struct {15 return struct {
14 allocator: *Allocator,16 allocator: *Allocator,
15 buf: []T,17 buf: []T,
...@@ -107,8 +109,6 @@ pub fn FixedSizeFifo(comptime T: type) type {...@@ -107,8 +109,6 @@ pub fn FixedSizeFifo(comptime T: type) type {
107 return self.readableSliceMut(offset);109 return self.readableSliceMut(offset);
108 }110 }
109111
110 const autoalign = false;
111
112 /// Discard first `count` bytes of readable data112 /// Discard first `count` bytes of readable data
113 pub fn discard(self: *Self, count: usize) void {113 pub fn discard(self: *Self, count: usize) void {
114 assert(count <= self.count);114 assert(count <= self.count);