fmt: apply rustfmt
This commit is contained in:
+2
-10
@@ -160,21 +160,13 @@ fn copy_file_times(src: &Path, dest: &Path) -> Result<(), Box<dyn Error>> {
|
||||
fn component_addon(name: &str) -> Option<&str> {
|
||||
let rest = name.split_once(".orig-")?.1;
|
||||
let addon = rest.split(".tar.").next()?;
|
||||
if addon.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(addon)
|
||||
}
|
||||
if addon.is_empty() { None } else { Some(addon) }
|
||||
}
|
||||
|
||||
/// Move the contents of an archive's wrapper directory into `dir`, or into
|
||||
/// `dir/<addon>` for a multi-orig component, replacing any pre-existing
|
||||
/// addon directory.
|
||||
fn unwrap_into(
|
||||
dir: &Path,
|
||||
wrapper: &Path,
|
||||
addon: Option<&str>,
|
||||
) -> Result<(), Box<dyn Error>> {
|
||||
fn unwrap_into(dir: &Path, wrapper: &Path, addon: Option<&str>) -> Result<(), Box<dyn Error>> {
|
||||
let target = match addon {
|
||||
Some(addon) => {
|
||||
let target = dir.join(addon);
|
||||
|
||||
Reference in New Issue
Block a user