std/containers: improve consistency using gpa parameter name for allocator.

This commit is contained in:
remeh
2025-03-06 14:18:24 +01:00
committed by Alex Rønne Petersen
parent 1eb729b9b9
commit 02f63fdee9
2 changed files with 67 additions and 69 deletions

View File

@@ -248,8 +248,8 @@ pub fn MultiArrayList(comptime T: type) type {
/// Extend the list by 1 element, returning the newly reserved
/// index with uninitialized data.
/// Allocates more memory as necesasry.
pub fn addOne(self: *Self, allocator: Allocator) Allocator.Error!usize {
try self.ensureUnusedCapacity(allocator, 1);
pub fn addOne(self: *Self, gpa: Allocator) Allocator.Error!usize {
try self.ensureUnusedCapacity(gpa, 1);
return self.addOneAssumeCapacity();
}