From 1d88b8409ed24efd52889c73a0938a2ab29d3022 Mon Sep 17 00:00:00 2001
From: Alexander Bantyev
Date: Tue, 22 Jun 2021 14:57:50 +0300
Subject: Cargo fmt

---
 src/bin/activate.rs |  6 +++++-
 src/bin/deploy.rs   | 12 ++++++------
 2 files changed, 11 insertions(+), 7 deletions(-)

(limited to 'src')

diff --git a/src/bin/activate.rs b/src/bin/activate.rs
index 6e18652..9cf8819 100644
--- a/src/bin/activate.rs
+++ b/src/bin/activate.rs
@@ -390,7 +390,11 @@ pub async fn activate(
 
     debug!("Running activation script");
 
-    let activation_location = if dry_activate { &closure } else { &profile_path };
+    let activation_location = if dry_activate {
+        &closure
+    } else {
+        &profile_path
+    };
 
     let activate_status = match Command::new(format!("{}/deploy-rs-activate", activation_location))
         .env("PROFILE", activation_location)
diff --git a/src/bin/deploy.rs b/src/bin/deploy.rs
index 4419ef1..7f6fd20 100644
--- a/src/bin/deploy.rs
+++ b/src/bin/deploy.rs
@@ -560,7 +560,8 @@ async fn run_deploy(
     // Rollbacks adhere to the global seeting to auto_rollback and secondary
     // the profile's configuration
     for (_, deploy_data, deploy_defs) in &parts {
-        if let Err(e) = deploy::deploy::deploy_profile(deploy_data, deploy_defs, dry_activate).await {
+        if let Err(e) = deploy::deploy::deploy_profile(deploy_data, deploy_defs, dry_activate).await
+        {
             error!("{}", e);
             if dry_activate {
                 info!("dry run, not rolling back");
@@ -613,11 +614,10 @@ async fn run() -> Result<(), RunError> {
         deploy::LoggerType::Deploy,
     )?;
 
-    let deploys = opts.clone().targets.unwrap_or_else(|| {
-        opts.clone()
-            .target
-            .unwrap_or(Some(vec![".".to_string()]))
-    });
+    let deploys = opts
+        .clone()
+        .targets
+        .unwrap_or_else(|| vec![opts.clone().target.unwrap_or(".".to_string())]);
 
     let deploy_flakes: Vec<DeployFlake> = deploys
         .iter()
-- 
cgit v1.2.3