remove some collapsible_if (#12539)

* remove some collapsible_if

* Use .ok() == .ok()

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

---------

Co-authored-by: oech3 <>
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
This commit is contained in:
oech3
2026-05-31 22:15:19 +09:00
committed by GitHub
parent 1457a1e366
commit 7f0053075e
2 changed files with 4 additions and 11 deletions
+3 -5
View File
@@ -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
+1 -6
View File
@@ -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() && info1.ok() == info2.ok()
}
/// Converts absolute `path` to be relative to absolute `to` path.