diff --git a/src/commands/down.rs b/src/commands/down.rs index d0f767567..5af1eaa8b 100644 --- a/src/commands/down.rs +++ b/src/commands/down.rs @@ -93,11 +93,7 @@ pub async fn command(args: Args, _json: bool) -> Result<()> { .edges .into_iter() .filter_map(|deployment| { - if deployment.node.status == DeploymentStatus::SUCCESS { - Some(deployment.node) - } else { - None - } + (deployment.node.status == DeploymentStatus::SUCCESS).then_some(deployment.node) }) .collect(); deployments.sort_by(|a, b| b.created_at.cmp(&a.created_at)); diff --git a/src/commands/logs.rs b/src/commands/logs.rs index 8e490f219..587e4a336 100644 --- a/src/commands/logs.rs +++ b/src/commands/logs.rs @@ -81,11 +81,7 @@ pub async fn command(args: Args, json: bool) -> Result<()> { .edges .into_iter() .filter_map(|deployment| { - if deployment.node.status == DeploymentStatus::SUCCESS { - Some(deployment.node) - } else { - None - } + (deployment.node.status == DeploymentStatus::SUCCESS).then_some(deployment.node) }) .collect(); deployments.sort_by(|a, b| b.created_at.cmp(&a.created_at));