authorgravatar for slowdive@me.com-k <slowdive@me.com> 2023-04-21 21:21:17-07:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2023-04-22 13:09:15+03:00
log0282c2a924054472ccc8d82325e8393442381760
treec86ef0cff0e01937885551c9768e114b23b87f90
parent4374ce51b0ffdaa317b6678d6622ecb88877f7f9

doc: fix minor grammar issues


6 files changed, 11 insertions(+), 11 deletions(-)

lib/std/array_hash_map.zig+2-2
...@@ -54,7 +54,7 @@ pub fn hashString(s: []const u8) u32 {...@@ -54,7 +54,7 @@ pub fn hashString(s: []const u8) u32 {
5454
55/// Insertion order is preserved.55/// Insertion order is preserved.
56/// Deletions perform a "swap removal" on the entries list.56/// Deletions perform a "swap removal" on the entries list.
57/// Modifying the hash map while iterating is allowed, however one must understand57/// Modifying the hash map while iterating is allowed, however, one must understand
58/// the (well defined) behavior when mixing insertions and deletions with iteration.58/// the (well defined) behavior when mixing insertions and deletions with iteration.
59/// For a hash map that can be initialized directly that does not store an Allocator59/// For a hash map that can be initialized directly that does not store an Allocator
60/// field, see `ArrayHashMapUnmanaged`.60/// field, see `ArrayHashMapUnmanaged`.
...@@ -448,7 +448,7 @@ pub fn ArrayHashMap(...@@ -448,7 +448,7 @@ pub fn ArrayHashMap(
448/// General purpose hash table.448/// General purpose hash table.
449/// Insertion order is preserved.449/// Insertion order is preserved.
450/// Deletions perform a "swap removal" on the entries list.450/// Deletions perform a "swap removal" on the entries list.
451/// Modifying the hash map while iterating is allowed, however one must understand451/// Modifying the hash map while iterating is allowed, however, one must understand
452/// the (well defined) behavior when mixing insertions and deletions with iteration.452/// the (well defined) behavior when mixing insertions and deletions with iteration.
453/// This type does not store an Allocator field - the Allocator must be passed in453/// This type does not store an Allocator field - the Allocator must be passed in
454/// with each function call that requires it. See `ArrayHashMap` for a type that stores454/// with each function call that requires it. See `ArrayHashMap` for a type that stores
lib/std/array_list.zig+2-2
...@@ -31,7 +31,7 @@ pub fn ArrayListAligned(comptime T: type, comptime alignment: ?u29) type {...@@ -31,7 +31,7 @@ pub fn ArrayListAligned(comptime T: type, comptime alignment: ?u29) type {
31 return struct {31 return struct {
32 const Self = @This();32 const Self = @This();
33 /// Contents of the list. Pointers to elements in this slice are33 /// Contents of the list. Pointers to elements in this slice are
34 /// **invalid after resizing operations** on the ArrayList, unless the34 /// **invalid after resizing operations** on the ArrayList unless the
35 /// operation explicitly either: (1) states otherwise or (2) lists the35 /// operation explicitly either: (1) states otherwise or (2) lists the
36 /// invalidated pointers.36 /// invalidated pointers.
37 ///37 ///
...@@ -527,7 +527,7 @@ pub fn ArrayListAlignedUnmanaged(comptime T: type, comptime alignment: ?u29) typ...@@ -527,7 +527,7 @@ pub fn ArrayListAlignedUnmanaged(comptime T: type, comptime alignment: ?u29) typ
527 return struct {527 return struct {
528 const Self = @This();528 const Self = @This();
529 /// Contents of the list. Pointers to elements in this slice are529 /// Contents of the list. Pointers to elements in this slice are
530 /// **invalid after resizing operations** on the ArrayList, unless the530 /// **invalid after resizing operations** on the ArrayList unless the
531 /// operation explicitly either: (1) states otherwise or (2) lists the531 /// operation explicitly either: (1) states otherwise or (2) lists the
532 /// invalidated pointers.532 /// invalidated pointers.
533 ///533 ///
lib/std/buf_map.zig+1-1
...@@ -4,7 +4,7 @@ const mem = std.mem;...@@ -4,7 +4,7 @@ const mem = std.mem;
4const Allocator = mem.Allocator;4const Allocator = mem.Allocator;
5const testing = std.testing;5const testing = std.testing;
66
7/// BufMap copies keys and values before they go into the map, and7/// BufMap copies keys and values before they go into the map and
8/// frees them when they get removed.8/// frees them when they get removed.
9pub const BufMap = struct {9pub const BufMap = struct {
10 hash_map: BufMapHashMap,10 hash_map: BufMapHashMap,
lib/std/hash_map.zig+1-1
...@@ -350,7 +350,7 @@ pub fn verifyContext(...@@ -350,7 +350,7 @@ pub fn verifyContext(
350/// General purpose hash table.350/// General purpose hash table.
351/// No order is guaranteed and any modification invalidates live iterators.351/// No order is guaranteed and any modification invalidates live iterators.
352/// It provides fast operations (lookup, insertion, deletion) with quite high352/// It provides fast operations (lookup, insertion, deletion) with quite high
353/// load factors (up to 80% by default) for a low memory usage.353/// load factors (up to 80% by default) for low memory usage.
354/// For a hash map that can be initialized directly that does not store an Allocator354/// For a hash map that can be initialized directly that does not store an Allocator
355/// field, see `HashMapUnmanaged`.355/// field, see `HashMapUnmanaged`.
356/// If iterating over the table entries is a strong usecase and needs to be fast,356/// If iterating over the table entries is a strong usecase and needs to be fast,
lib/std/os/linux/seccomp.zig+2-2
...@@ -29,8 +29,8 @@...@@ -29,8 +29,8 @@
29//! which is dependant on the ABI. Since BPF programs execute in a 32-bit29//! which is dependant on the ABI. Since BPF programs execute in a 32-bit
30//! machine, validation of 64-bit arguments necessitates two load-and-compare30//! machine, validation of 64-bit arguments necessitates two load-and-compare
31//! instructions for the upper and lower words.31//! instructions for the upper and lower words.
32//! 3. A further wrinkle to the above is endianess. Unlike network packets,32//! 3. A further wrinkle to the above is endianness. Unlike network packets,
33//! syscall data shares the endianess of the target machine. A filter33//! syscall data shares the endianness of the target machine. A filter
34//! compiled on a little-endian machine will not work on a big-endian one,34//! compiled on a little-endian machine will not work on a big-endian one,
35//! and vice-versa. For example: Checking the upper 32-bits of `data.arg1`35//! and vice-versa. For example: Checking the upper 32-bits of `data.arg1`
36//! requires a load at `@offsetOf(data, "arg1") + 4` on big-endian systems36//! requires a load at `@offsetOf(data, "arg1") + 4` on big-endian systems
lib/std/packed_int_array.zig+3-3
...@@ -182,7 +182,7 @@ pub fn PackedIntIo(comptime Int: type, comptime endian: Endian) type {...@@ -182,7 +182,7 @@ pub fn PackedIntIo(comptime Int: type, comptime endian: Endian) type {
182182
183/// Creates a bit-packed array of `Int`. Non-byte-multiple integers183/// Creates a bit-packed array of `Int`. Non-byte-multiple integers
184/// will take up less memory in PackedIntArray than in a normal array.184/// will take up less memory in PackedIntArray than in a normal array.
185/// Elements are packed using native endianess and without storing any185/// Elements are packed using native endianness and without storing any
186/// meta data. PackedArray(i3, 8) will occupy exactly 3 bytes186/// meta data. PackedArray(i3, 8) will occupy exactly 3 bytes
187/// of memory.187/// of memory.
188pub fn PackedIntArray(comptime Int: type, comptime int_count: usize) type {188pub fn PackedIntArray(comptime Int: type, comptime int_count: usize) type {
...@@ -261,7 +261,7 @@ pub fn PackedIntArrayEndian(comptime Int: type, comptime endian: Endian, comptim...@@ -261,7 +261,7 @@ pub fn PackedIntArrayEndian(comptime Int: type, comptime endian: Endian, comptim
261 }261 }
262262
263 /// Create a PackedIntSliceEndian of the array using `NewInt` as the integer type263 /// Create a PackedIntSliceEndian of the array using `NewInt` as the integer type
264 /// and `new_endian` as the new endianess. `NewInt`'s bit width must fit evenly264 /// and `new_endian` as the new endianness. `NewInt`'s bit width must fit evenly
265 /// within the array's `Int`'s total bits.265 /// within the array's `Int`'s total bits.
266 pub fn sliceCastEndian(self: *Self, comptime NewInt: type, comptime new_endian: Endian) PackedIntSliceEndian(NewInt, new_endian) {266 pub fn sliceCastEndian(self: *Self, comptime NewInt: type, comptime new_endian: Endian) PackedIntSliceEndian(NewInt, new_endian) {
267 return Io.sliceCast(&self.bytes, NewInt, new_endian, 0, int_count);267 return Io.sliceCast(&self.bytes, NewInt, new_endian, 0, int_count);
...@@ -336,7 +336,7 @@ pub fn PackedIntSliceEndian(comptime Int: type, comptime endian: Endian) type {...@@ -336,7 +336,7 @@ pub fn PackedIntSliceEndian(comptime Int: type, comptime endian: Endian) type {
336 }336 }
337337
338 /// Create a PackedIntSliceEndian of the slice using `NewInt` as the integer type338 /// Create a PackedIntSliceEndian of the slice using `NewInt` as the integer type
339 /// and `new_endian` as the new endianess. `NewInt`'s bit width must fit evenly339 /// and `new_endian` as the new endianness. `NewInt`'s bit width must fit evenly
340 /// within the slice's `Int`'s total bits.340 /// within the slice's `Int`'s total bits.
341 pub fn sliceCastEndian(self: Self, comptime NewInt: type, comptime new_endian: Endian) PackedIntSliceEndian(NewInt, new_endian) {341 pub fn sliceCastEndian(self: Self, comptime NewInt: type, comptime new_endian: Endian) PackedIntSliceEndian(NewInt, new_endian) {
342 return Io.sliceCast(self.bytes, NewInt, new_endian, self.bit_offset, self.len);342 return Io.sliceCast(self.bytes, NewInt, new_endian, self.bit_offset, self.len);