termio: allocate initial capacity more accurately

This commit is contained in:
Mitchell Hashimoto
2023-12-16 14:04:58 -08:00
parent e4dc9845ed
commit 30d3928e0f

View File

@ -800,7 +800,7 @@ const Subprocess = struct {
// Build our args list // Build our args list
const args = args: { const args = args: {
const cap = 6; // the most we'll use on macOS const cap = 9; // the most we'll ever use
var args = try std.ArrayList([]const u8).initCapacity(alloc, cap); var args = try std.ArrayList([]const u8).initCapacity(alloc, cap);
defer args.deinit(); defer args.deinit();