Skip to content

Commit

Permalink
Use safe unwrapping in option unwrap (#1355)
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch authored Jun 5, 2024
1 parent 610c6f9 commit 7f8116d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cmd/soroban-cli/src/commands/network/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,9 @@ fn get_image_name(cmd: &Cmd) -> String {
_ => "latest", // default to latest for local and pubnet
};

if cmd.image_tag_override.is_some() {
let override_tag = cmd.image_tag_override.as_ref().unwrap();
println!("Overriding docker image tag to use '{override_tag}' instead of '{image_tag}'");

image_tag = override_tag;
if let Some(image_override) = &cmd.image_tag_override {
println!("Overriding docker image tag to use '{image_override}' instead of '{image_tag}'");
image_tag = image_override;
}

format!("{DOCKER_IMAGE}:{image_tag}")
Expand Down

0 comments on commit 7f8116d

Please sign in to comment.