Skip to content

Commit

Permalink
Use safe unwrapping in option unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Jun 4, 2024
1 parent 67840a3 commit 19f6136
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmd/soroban-cli/src/commands/network/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,8 @@ 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}'");
if let Some(override) = &cmd.image_tag_override {
println!("Overriding docker image tag to use '{override}' instead of '{image_tag}'");

image_tag = override_tag;
}
Expand Down

0 comments on commit 19f6136

Please sign in to comment.