From 7a86f0626009596bdedfcd69e8f4f95126e005f7 Mon Sep 17 00:00:00 2001 From: Elizabeth Engelman <4752801+elizabethengelman@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:22:05 -0500 Subject: [PATCH] Move bollard options inline --- cmd/soroban-cli/src/commands/network/start.rs | 35 ++++++++++++------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/cmd/soroban-cli/src/commands/network/start.rs b/cmd/soroban-cli/src/commands/network/start.rs index b286c8ff5e..1a8a097db1 100644 --- a/cmd/soroban-cli/src/commands/network/start.rs +++ b/cmd/soroban-cli/src/commands/network/start.rs @@ -59,13 +59,15 @@ async fn run_docker_command(cmd: &Cmd) -> Result<(), Error> { let docker = connect_to_docker(&cmd.docker_socket_path)?; let image = get_image_name(cmd); - let create_image_options = Some(CreateImageOptions { - from_image: image.clone(), - ..Default::default() - }); - docker - .create_image(create_image_options, None, None) + .create_image( + Some(CreateImageOptions { + from_image: image.clone(), + ..Default::default() + }), + None, + None, + ) .try_collect::>() .await?; @@ -86,14 +88,21 @@ async fn run_docker_command(cmd: &Cmd) -> Result<(), Error> { }; let container_name = format!("stellar-{}", cmd.network); - let options = Some(CreateContainerOptions { - name: container_name, - platform: None, - }); - - let response = docker.create_container(options, config).await.unwrap(); + let create_container_response = docker + .create_container( + Some(CreateContainerOptions { + name: container_name, + ..Default::default() + }), + config, + ) + .await + .unwrap(); docker - .start_container(&response.id, None::>) + .start_container( + &create_container_response.id, + None::>, + ) .await .map_err(Error::StartContainerError) }