Skip to content

Commit 7ccfb4f

Browse files
committed
transpile: remove redundant postprocess failed: errors
1 parent 173f08c commit 7ccfb4f

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

c2rust-transpile/src/lib.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -445,8 +445,7 @@ pub fn transpile(tcfg: TranspilerConfig, cc_db: &Path, extra_clang_args: &[&str]
445445
let crate_file = crate_file.as_deref();
446446
reorganize_definitions(&tcfg, &build_dir, crate_file)
447447
.unwrap_or_else(|e| warn!("Reorganizing definitions failed: {}", e));
448-
run_postprocess(&tcfg, &build_dir, crate_file)
449-
.unwrap_or_else(|e| warn!("postprocess failed: {e}"));
448+
run_postprocess(&tcfg, &build_dir, crate_file).unwrap_or_else(|e| warn!("{e}"));
450449
workspace_members.push(lcmd_name);
451450
}
452451
}
@@ -463,8 +462,7 @@ pub fn transpile(tcfg: TranspilerConfig, cc_db: &Path, extra_clang_args: &[&str]
463462
let crate_file = crate_file.as_deref();
464463
reorganize_definitions(&tcfg, &build_dir, crate_file)
465464
.unwrap_or_else(|e| warn!("Reorganizing definitions failed: {}", e));
466-
run_postprocess(&tcfg, &build_dir, crate_file)
467-
.unwrap_or_else(|e| warn!("postprocess failed: {e}"));
465+
run_postprocess(&tcfg, &build_dir, crate_file).unwrap_or_else(|e| warn!("{e}"));
468466
}
469467

470468
tcfg.check_if_all_binaries_used(&transpiled_modules);
@@ -617,7 +615,7 @@ fn invoke_postprocess(crate_file: &Path, build_dir: &Path) -> Result<(), Error>
617615
})?;
618616

619617
if !status.success() {
620-
Err(format_err!("postprocessing failed: {cmd:?}"))?;
618+
Err(format_err!("postprocess failed: {cmd:?}"))?;
621619
}
622620

623621
Ok(())

0 commit comments

Comments
 (0)