Skip to content

Commit

Permalink
Use Bool::then
Browse files Browse the repository at this point in the history
  • Loading branch information
Malax committed Jun 23, 2022
1 parent a1fe897 commit 603e1d6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions libcnb-test/src/test_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ impl TestRunner {
(app_dir_preprocessor)(PathBuf::from(temp_app_dir.path()));
}

let temp_crate_buildpack_dir = if config.buildpacks.contains(&BuildpackReference::Crate) {
Some(
build::package_crate_buildpack(&config.target_triple)
.expect("Could not package current crate as buildpack"),
)
} else {
None
};
let temp_crate_buildpack_dir =
config
.buildpacks
.contains(&BuildpackReference::Crate)
.then(|| {
build::package_crate_buildpack(&config.target_triple)
.expect("Could not package current crate as buildpack")
});

let mut pack_command = PackBuildCommand::new(
&config.builder_name,
Expand Down

0 comments on commit 603e1d6

Please sign in to comment.