1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 12:37:49 +00:00

Change Default Buffer to usize::MAX

This commit is contained in:
electricboogie 2021-04-25 21:38:22 -05:00
parent 1a407c2328
commit e5c19734c8

View file

@ -93,8 +93,7 @@ static NEGATIVE: char = '-';
static POSITIVE: char = '+';
static DEFAULT_TMPDIR: &str = r"/tmp";
// 4GB buffer for Vec<Line> before we dump to disk, never used
static DEFAULT_BUF_SIZE: usize = 4000000000;
static DEFAULT_BUF_SIZE: usize = usize::MAX;
#[derive(Eq, Ord, PartialEq, PartialOrd, Clone, Copy)]
enum SortMode {
@ -142,11 +141,11 @@ impl GlobalSettings {
let suf_usize: usize = match suf_str.to_uppercase().as_str() {
// SI Units
"B" => 1usize,
"K" => 1024usize,
"M" => 1024000usize,
"G" => 1024000000usize,
// GNU regards empty human numeric value as 1024 bytes
_ => 1024usize,
"K" => 1000usize,
"M" => 1000000usize,
"G" => 1000000000usize,
// GNU regards empty human numeric values as K by default
_ => 1000usize,
};
num_usize * suf_usize
}