1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

Merge pull request #5687 from cakebaker/ls_remove_condition

ls: remove condition with unreachable "else" block
This commit is contained in:
Sylvestre Ledru 2023-12-21 10:44:58 +01:00 committed by GitHub
commit 95852dbaa5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2480,14 +2480,10 @@ fn get_block_size(md: &Metadata, config: &Config) -> u64 {
match config.size_format {
SizeFormat::Binary | SizeFormat::Decimal => raw_blocks,
SizeFormat::Bytes => {
if cfg!(unix) {
if let Some(user_block_size) = config.block_size {
raw_blocks / user_block_size
} else {
raw_blocks / DEFAULT_BLOCK_SIZE
}
if let Some(user_block_size) = config.block_size {
raw_blocks / user_block_size
} else {
raw_blocks
raw_blocks / DEFAULT_BLOCK_SIZE
}
}
}