std: move auto_align constant to top of comptime function

At a later point in time this might be made into a parameter
master
daurnimator 2019-11-11 01:32:52 +11:00
parent 52645d06e1
commit 01b2a56225
No known key found for this signature in database
GPG Key ID: 45B429A8F9D9D22A
1 changed files with 2 additions and 2 deletions

View File

@ -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);