chore: Move CliCommand::run -> CliArgs::run; do not mutate the configuration

This way CliArgs::run has access to all command line parameters.
Avoided mutating the CliArgs (or rather CliCommand) structure here,
because doing so is simply bad style. There is no good reasoning for
why this function should mutate CliCommand, except for a bit of
convenience.
This commit is contained in:
Karolin Varner
2024-08-03 15:32:15 +02:00
parent 1ab457ed37
commit 3cc3b6009f
3 changed files with 17 additions and 17 deletions

View File

@@ -104,8 +104,7 @@ fn run_server_client_exchange(
.unwrap();
std::thread::spawn(move || {
cli.command
.run(Some(
cli.run(Some(
server_test_builder
.termination_handler(Some(server_terminate_rx))
.build()
@@ -122,8 +121,7 @@ fn run_server_client_exchange(
.unwrap();
std::thread::spawn(move || {
cli.command
.run(Some(
cli.run(Some(
client_test_builder
.termination_handler(Some(client_terminate_rx))
.build()