@@ -1065,10 +1065,13 @@ impl Options {
10651065 #[ cfg( unix) ]
10661066 fn preserve_mode ( & self ) -> ( bool , bool ) {
10671067 match self . attributes . mode {
1068- Preserve :: No { explicit } => match explicit {
1069- true => ( false , true ) ,
1070- false => ( false , false ) ,
1071- } ,
1068+ Preserve :: No { explicit } => {
1069+ if explicit {
1070+ ( false , true )
1071+ } else {
1072+ ( false , false )
1073+ }
1074+ }
10721075 Preserve :: Yes { .. } => ( true , false ) ,
10731076 }
10741077 }
@@ -2034,9 +2037,10 @@ fn handle_no_preserve_mode(options: &Options, org_mode: u32) -> u32 {
20342037 {
20352038 const MODE_RW_UGO : u32 = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH ;
20362039 const S_IRWXUGO : u32 = S_IRWXU | S_IRWXG | S_IRWXO ;
2037- match is_explicit_no_preserve_mode {
2038- true => return MODE_RW_UGO ,
2039- false => return org_mode & S_IRWXUGO ,
2040+ if is_explicit_no_preserve_mode {
2041+ return MODE_RW_UGO ;
2042+ } else {
2043+ return org_mode & S_IRWXUGO ;
20402044 } ;
20412045 }
20422046
@@ -2051,9 +2055,10 @@ fn handle_no_preserve_mode(options: &Options, org_mode: u32) -> u32 {
20512055 const MODE_RW_UGO : u32 =
20522056 ( S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH ) as u32 ;
20532057 const S_IRWXUGO : u32 = ( S_IRWXU | S_IRWXG | S_IRWXO ) as u32 ;
2054- match is_explicit_no_preserve_mode {
2055- true => return MODE_RW_UGO ,
2056- false => return org_mode & S_IRWXUGO ,
2058+ if is_explicit_no_preserve_mode {
2059+ return MODE_RW_UGO ;
2060+ } else {
2061+ return org_mode & S_IRWXUGO ;
20572062 } ;
20582063 }
20592064 }
0 commit comments