Skip to content

Commit

Permalink
Update bounded_array.zig
Browse files Browse the repository at this point in the history
Co-authored-by: Philipp Lühmann <[email protected]>
  • Loading branch information
jedisct1 and luehmann committed Nov 24, 2023
1 parent 557625d commit 4db3c3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/std/bounded_array.zig
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub fn BoundedArrayAligned(

buffer: [buffer_capacity]T align(alignment) = undefined,

/// The active array length. Not that in order to save space, this is not
/// The active array length. Note that in order to save space, this is not
/// a `usize`, but rather the smallest integer type that can hold the
/// maximum capacity. In order to get the length as a `usize`, use `len()`.
active_len: Len = 0,
Expand Down Expand Up @@ -405,7 +405,7 @@ test "BoundedArray sizeOf" {

try testing.expectEqual(@sizeOf(BoundedArray(u8, 3)), 4);

// `len` is the minimum required size to hold the maximum capacity
// `active_len` is the minimum required size to hold the maximum capacity
try testing.expectEqual(@TypeOf(@as(BoundedArray(u8, 15), undefined).active_len), u4);
try testing.expectEqual(@TypeOf(@as(BoundedArray(u8, 16), undefined).active_len), u5);
}
Expand Down

0 comments on commit 4db3c3e

Please sign in to comment.