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:
parent
1a407c2328
commit
e5c19734c8
1 changed files with 6 additions and 7 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue