Skip to content

Commit

Permalink
[rust] Use question mark operator when setting file permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
bonigarcia committed Aug 7, 2023
1 parent 3031d14 commit efefbc9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rust/src/files.rs
Expand Up @@ -162,8 +162,7 @@ pub fn unzip(
if single_file.is_some() {
fs::set_permissions(&out_path, fs::Permissions::from_mode(0o755))?;
} else if let Some(mode) = file.unix_mode() {
fs::set_permissions(&out_path, fs::Permissions::from_mode(mode))
.unwrap_or_default();
fs::set_permissions(&out_path, fs::Permissions::from_mode(mode))?;
}
}
}
Expand Down

0 comments on commit efefbc9

Please sign in to comment.