Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commiteef9202

Browse files
committed
chore(cp): simplify return statement in handle_no_preserve_mode function
1 parent37ec58b commiteef9202

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎src/uu/cp/src/cp.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2662,10 +2662,11 @@ fn handle_no_preserve_mode(options: &Options, org_mode: u32) -> u32 {
26622662
constMODE_RW_UGO:u32 =
26632663
(S_IRUSR |S_IWUSR |S_IRGRP |S_IWGRP |S_IROTH |S_IWOTH)asu32;
26642664
constS_IRWXUGO:u32 =(S_IRWXU |S_IRWXG |S_IRWXO)asu32;
2665-
if is_explicit_no_preserve_mode{
2666-
returnMODE_RW_UGO;
2667-
}
2668-
return org_mode&S_IRWXUGO;
2665+
returnif is_explicit_no_preserve_mode{
2666+
MODE_RW_UGO
2667+
}else{
2668+
org_mode&S_IRWXUGO
2669+
};
26692670
}
26702671
}
26712672

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp