Cargo fmt fix

This commit is contained in:
Prabhpreet Dua
2024-04-15 22:13:14 +05:30
parent b56af8b696
commit 15aafe7563
3 changed files with 20 additions and 17 deletions

View File

@@ -507,7 +507,7 @@ impl AppServer {
non_blocking_polls_count: 0,
unpolled_count: 0,
last_update_time: Instant::now(),
test_flags
test_flags,
})
}

View File

@@ -6,8 +6,8 @@ use rosenpass_secret_memory::file::StoreSecret;
use rosenpass_util::file::{LoadValue, LoadValueB64};
use std::path::PathBuf;
use crate::app_server::{self, AppServerTestFlags};
use crate::app_server::AppServer;
use crate::app_server::{self, AppServerTestFlags};
use crate::protocol::{SPk, SSk, SymKey};
use super::config;
@@ -307,7 +307,7 @@ impl CliCommand {
pk,
config.listen,
config.verbosity,
test_flags
test_flags,
)?);
for cfg_peer in config.peers {

View File

@@ -166,7 +166,8 @@ fn check_exchange_under_dos() {
let mut server_cmd = std::process::Command::new(BIN);
server_cmd.args(["exchange", "secret-key"])
server_cmd
.args(["exchange", "secret-key"])
.arg(&secret_key_paths[0])
.arg("public-key")
.arg(&public_key_paths[0])
@@ -175,22 +176,24 @@ fn check_exchange_under_dos() {
.arg("outfile")
.arg(&shared_key_paths[0]);
let server_cmd: Vec<String> = server_cmd
.get_args()
.into_iter()
.fold(vec![BIN.to_string()], |mut acc, x| {
if let Some(s) = x.to_str() {
acc.push(s.to_string());
}
acc
});
let server_cmd: Vec<String> =
server_cmd
.get_args()
.into_iter()
.fold(vec![BIN.to_string()], |mut acc, x| {
if let Some(s) = x.to_str() {
acc.push(s.to_string());
}
acc
});
let mut server = procspawn::spawn(server_cmd, |server_cmd: Vec<String>| {
let cli = CliArgs::try_parse_from(server_cmd.iter()).unwrap();
cli.command.run(AppServerTestFlags {
enable_dos_permanently: true,
}).unwrap();
cli.command
.run(AppServerTestFlags {
enable_dos_permanently: true,
})
.unwrap();
});
// start second process, the client