Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
gswirski committed Sep 20, 2023
1 parent 35ad0cb commit 7100ce1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
9 changes: 3 additions & 6 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,9 @@ pub(crate) fn run(mut app_config: AppConfig) -> Result<()> {
#[cfg(target_arch = "aarch64")]
codesign(&target_filepath, &workspace)?;


if let Target::Test(_, ref tests) = cargo_options.target {
app_config.target_args.insert(0, tests.clone());
}
}

// 4. Profile the built target, will display menu if no template was selected
let trace_filepath =
Expand Down Expand Up @@ -139,7 +138,7 @@ fn codesign(path: &Path, workspace: &Workspace) -> Result<()> {
/// the path to the built executable.
fn build_target(cargo_options: &CargoOpts, workspace: &Workspace) -> Result<PathBuf> {
use cargo::core::shell::Verbosity;
workspace.config().shell().set_verbosity(Verbosity::Verbose);
workspace.config().shell().set_verbosity(Verbosity::Normal);

let compile_options = make_compile_opts(cargo_options, workspace.config())?;
let result = cargo::ops::compile(workspace, &compile_options)?;
Expand All @@ -155,9 +154,7 @@ fn build_target(cargo_options: &CargoOpts, workspace: &Workspace) -> Result<Path
result
.tests
.iter()
.find(|unit_output| {
unit_output.unit.target.name() == harness
})
.find(|unit_output| unit_output.unit.target.name() == harness)
.map(|unit_output| unit_output.path.clone())
.ok_or_else(|| anyhow!("no test '{}'", harness))
} else {
Expand Down
1 change: 0 additions & 1 deletion src/opt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ impl AppConfig {
} else if let Some(ref harness) = self.harness {
let test = self.test.clone().unwrap_or_default();
Target::Test(harness.clone(), test)

} else {
Target::Main
}
Expand Down

0 comments on commit 7100ce1

Please sign in to comment.