Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/uu/unexpand/src/unexpand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,9 @@ fn parse_tabstops(s: &str) -> Result<TabConfig, ParseError> {

// Handle the increment if specified
// Only add an extra tab stop if increment is non-zero
if let Some(inc) = increment_size {
if inc > 0 {
let last = *nums.last().unwrap();
nums.push(last + inc);
}
if let Some(inc) = increment_size.filter(|&i| i > 0) {
let last = *nums.last().unwrap();
nums.push(last + inc);
}

if let (false, _) = nums
Expand Down
7 changes: 1 addition & 6 deletions src/uucore/src/lib/features/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -633,12 +633,7 @@ pub fn infos_refer_to_same_file(
info1: IOResult<FileInformation>,
info2: IOResult<FileInformation>,
) -> bool {
if let Ok(info1) = info1 {
if let Ok(info2) = info2 {
return info1 == info2;
}
}
false
info1.is_ok_and(|i1| info2.is_ok_and(|i2| i1 == i2))
Comment thread
oech3 marked this conversation as resolved.
Outdated
}

/// Converts absolute `path` to be relative to absolute `to` path.
Expand Down
Loading