Skip to content

Commit

Permalink
Merge branch 'main' into nhudson/TEM-2542
Browse files Browse the repository at this point in the history
  • Loading branch information
nhudson authored Dec 15, 2023
2 parents 77a3dbe + 5fbe479 commit ad75960
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tembo-cli/src/cmd/apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,12 @@ pub fn get_instance_id(

match v {
Ok(result) => {
for instance in result.iter() {
if instance.instance_name == instance_name {
return Ok(Some(instance.clone().instance_id));
}
let maybe_instance = result
.iter()
.find(|instance| instance.instance_name == instance_name);

if let Some(instance) = maybe_instance {
return Ok(Some(instance.clone().instance_id));
}
}
Err(error) => eprintln!("Error getting instance: {}", error),
Expand Down

0 comments on commit ad75960

Please sign in to comment.