From 064432f38e2b519c7072f8df315903d92bae86cb Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Sat, 4 Dec 2021 01:03:26 -0800 Subject: [PATCH] nix/deployment: Misc cleanup --- flake.nix | 2 +- src/nix/deployment/mod.rs | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index 76be8b7..aea8c74 100644 --- a/flake.nix +++ b/flake.nix @@ -52,7 +52,7 @@ devShell = pkgs.mkShell { inputsFrom = [ defaultPackage ]; - nativeBuildInputs = with pkgs; [ mdbook python3 ]; + packages = with pkgs; [ clippy mdbook python3 ]; shellHook = '' export NIX_PATH=nixpkgs=${pkgs.path} ''; diff --git a/src/nix/deployment/mod.rs b/src/nix/deployment/mod.rs index 665c90b..3ac6505 100644 --- a/src/nix/deployment/mod.rs +++ b/src/nix/deployment/mod.rs @@ -140,9 +140,8 @@ impl Deployment { futures.push(deployment.clone().upload_keys_to_node(meta.clone(), target)); } - let result: NixResult> = join_all(futures).await.into_iter().collect(); - - result?; + join_all(futures).await + .into_iter().collect::>>()?; Ok(()) }); @@ -166,9 +165,8 @@ impl Deployment { futures.push(deployment.clone().execute_chunk(meta.clone(), chunk)); } - let result: NixResult> = join_all(futures).await.into_iter().collect(); - - result?; + join_all(futures).await + .into_iter().collect::>>()?; Ok(()) }); @@ -233,8 +231,8 @@ impl Deployment { futures.push(self.clone().deploy_node(parent.clone(), target, profile.clone())); } - let result: NixResult> = join_all(futures).await.into_iter().collect(); - result?; + join_all(futures).await + .into_iter().collect::>>()?; // Create GC root if self.options.create_gc_roots {