@@ -517,6 +517,7 @@ fn safe_du(
517517 }
518518
519519 // Process directories recursively
520+ #[ allow( clippy:: collapsible_if) ]
520521 if is_dir {
521522 if options. one_file_system {
522523 if let ( Some ( this_inode) , Some ( my_inode) ) = ( this_stat. inode , my_stat. inode ) {
@@ -637,6 +638,7 @@ fn du_regular(
637638 && options. dereference == Deref :: All
638639 && this_stat. metadata . is_dir ( )
639640 {
641+ #[ allow( clippy:: collapsible_if) ]
640642 if let Some ( inode) = this_stat. inode {
641643 if ancestors. contains ( & inode) {
642644 // This symlink points to an ancestor directory - skip to avoid cycle
@@ -674,7 +676,7 @@ fn du_regular(
674676 // Mark this inode as seen
675677 seen_inodes. insert ( inode) ;
676678 }
677-
679+ # [ allow ( clippy :: collapsible_if ) ]
678680 if this_stat. metadata . is_dir ( ) {
679681 if options. one_file_system {
680682 if let ( Some ( this_inode) , Some ( my_inode) ) =
@@ -1143,6 +1145,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
11431145
11441146 // Pre-populate seen_inodes with the starting directory to detect cycles
11451147 let stat = Stat :: new ( & path, None , & traversal_options) ;
1148+ #[ allow( clippy:: collapsible_if) ]
11461149 if let Ok ( stat) = stat. as_ref ( ) {
11471150 if let Some ( inode) = stat. inode {
11481151 if !traversal_options. count_links && seen_inodes. contains ( & inode) {
@@ -1172,6 +1175,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
11721175 }
11731176 Err ( e) => {
11741177 // Check if this is our "already handled" error
1178+ #[ allow( clippy:: collapsible_if) ]
11751179 if let mpsc:: SendError ( Err ( simple_error) ) = e. as_ref ( ) {
11761180 if simple_error. code ( ) == 0 {
11771181 // Error already handled, continue to next file
0 commit comments