ALPHA: wire is a tool to deploy nixos systems wire.althaea.zone/

[autofix.ci] apply automated fixes

authored by

autofix-ci[bot] and committed by
GitHub
42994a82 3ffb42e8

+7 -22
+1 -4
crates/core/src/commands/common.rs
··· 56 56 .mode(crate::commands::ChildOutputMode::Nix), 57 57 HashMap::from([( 58 58 "NIX_SSHOPTS".into(), 59 - context 60 - .node 61 - .target 62 - .create_ssh_opts(context.modifiers)?, 59 + context.node.target.create_ssh_opts(context.modifiers)?, 63 60 )]), 64 61 ) 65 62 .await?;
+6 -18
crates/core/src/hive/node.rs
··· 46 46 47 47 impl Target { 48 48 #[instrument(ret(level = tracing::Level::DEBUG), skip_all)] 49 - pub fn create_ssh_opts( 50 - &self, 51 - modifiers: SubCommandModifiers, 52 - ) -> Result<String, HiveLibError> { 53 - self.create_ssh_args(modifiers, false) 54 - .map(|x| x.join(" ")) 49 + pub fn create_ssh_opts(&self, modifiers: SubCommandModifiers) -> Result<String, HiveLibError> { 50 + self.create_ssh_args(modifiers, false).map(|x| x.join(" ")) 55 51 } 56 52 57 53 #[instrument(ret(level = tracing::Level::DEBUG))] ··· 855 851 ]; 856 852 857 853 assert_eq!( 858 - target 859 - .create_ssh_args(subcommand_modifiers, false) 860 - .unwrap(), 854 + target.create_ssh_args(subcommand_modifiers, false).unwrap(), 861 855 args 862 856 ); 863 857 assert_eq!( ··· 866 860 ); 867 861 868 862 assert_eq!( 869 - target 870 - .create_ssh_args(subcommand_modifiers, false) 871 - .unwrap(), 863 + target.create_ssh_args(subcommand_modifiers, false).unwrap(), 872 864 [ 873 865 "-l".to_string(), 874 866 target.user.to_string(), ··· 884 876 ); 885 877 886 878 assert_eq!( 887 - target 888 - .create_ssh_args(subcommand_modifiers, true) 889 - .unwrap(), 879 + target.create_ssh_args(subcommand_modifiers, true).unwrap(), 890 880 [ 891 881 "-l".to_string(), 892 882 target.user.to_string(), ··· 903 893 904 894 // forced non interactive is the same as --non-interactive 905 895 assert_eq!( 906 - target 907 - .create_ssh_args(subcommand_modifiers, true) 908 - .unwrap(), 896 + target.create_ssh_args(subcommand_modifiers, true).unwrap(), 909 897 target 910 898 .create_ssh_args( 911 899 SubCommandModifiers {