eh: replace magic buffer sizes
Some checks are pending
Rust / build (push) Waiting to run

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ifc24f3945763d75c58450e62b5ec701e6a6a6964
This commit is contained in:
raf 2025-11-13 00:57:51 +03:00
commit 91e5063bc8
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF

View file

@ -21,6 +21,9 @@ impl LogInterceptor for StdIoInterceptor {
}
}
/// Default buffer size for reading command output
const DEFAULT_BUFFER_SIZE: usize = 4096;
/// Builder and executor for Nix commands.
pub struct NixCommand {
subcommand: String,
@ -119,8 +122,8 @@ impl NixCommand {
let mut stdout = child_stdout;
let mut stderr = child_stderr;
let mut out_buf = [0u8; 4096];
let mut err_buf = [0u8; 4096];
let mut out_buf = [0u8; DEFAULT_BUFFER_SIZE];
let mut err_buf = [0u8; DEFAULT_BUFFER_SIZE];
let mut out_queue = VecDeque::new();
let mut err_queue = VecDeque::new();