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

Ran rustfmt

This commit is contained in:
electricboogie 2021-04-25 22:41:11 -05:00
parent 6654519c7d
commit c01c6a7d78
2 changed files with 23 additions and 30 deletions

View file

@ -235,8 +235,7 @@ where
let right_sized_buffer = adjusted_buffer_size let right_sized_buffer = adjusted_buffer_size
.checked_div(iter.chunks) .checked_div(iter.chunks)
.unwrap_or(adjusted_buffer_size); .unwrap_or(adjusted_buffer_size);
iter.max_per_chunk = iter.max_per_chunk = if right_sized_buffer > MINIMUM_READBACK_BUFFER {
if right_sized_buffer > MINIMUM_READBACK_BUFFER {
right_sized_buffer right_sized_buffer
} else { } else {
MINIMUM_READBACK_BUFFER MINIMUM_READBACK_BUFFER

View file

@ -92,17 +92,12 @@ static THOUSANDS_SEP: char = ',';
static NEGATIVE: char = '-'; static NEGATIVE: char = '-';
static POSITIVE: char = '+'; static POSITIVE: char = '+';
#[cfg(any( #[cfg(any(target_os = "windows",))]
target_os = "windows",
))]
static DEFAULT_TMPDIR: &str = r"%USERPROFILE%\AppData\Local\Temp"; static DEFAULT_TMPDIR: &str = r"%USERPROFILE%\AppData\Local\Temp";
#[cfg(not(any( #[cfg(not(any(target_os = "windows",)))]
target_os = "windows",
)))]
static DEFAULT_TMPDIR: &str = r"/tmp"; static DEFAULT_TMPDIR: &str = r"/tmp";
static DEFAULT_BUF_SIZE: usize = usize::MAX; static DEFAULT_BUF_SIZE: usize = usize::MAX;
#[derive(Eq, Ord, PartialEq, PartialOrd, Clone, Copy)] #[derive(Eq, Ord, PartialEq, PartialOrd, Clone, Copy)]
@ -1311,11 +1306,10 @@ fn compare_by(a: &Line, b: &Line, global_settings: &GlobalSettings) -> Ordering
(a_str, a_selection.num_cache.as_num_info()), (a_str, a_selection.num_cache.as_num_info()),
(b_str, b_selection.num_cache.as_num_info()), (b_str, b_selection.num_cache.as_num_info()),
), ),
SortMode::GeneralNumeric => { SortMode::GeneralNumeric => general_numeric_compare(
general_numeric_compare(
general_f64_parse(&a_str[get_leading_gen(a_str)]), general_f64_parse(&a_str[get_leading_gen(a_str)]),
general_f64_parse(&b_str[get_leading_gen(b_str)]),) general_f64_parse(&b_str[get_leading_gen(b_str)]),
} ),
SortMode::Month => month_compare(a_str, b_str), SortMode::Month => month_compare(a_str, b_str),
SortMode::Version => version_compare(a_str, b_str), SortMode::Version => version_compare(a_str, b_str),
SortMode::Default => default_compare(a_str, b_str), SortMode::Default => default_compare(a_str, b_str),