Skip to content

Commit

Permalink
Fix new clippy nit (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgb committed Jan 4, 2024
1 parent 2234064 commit e5030dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plane/src/drone/docker/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async fn try_get_port(docker: &Docker, container_id: &ContainerId) -> Result<u16
.and_then(|settings| settings.ports)
.and_then(|ports| ports.get(&format!("{}/tcp", CONTAINER_PORT)).cloned())
.and_then(|bindings| bindings.clone())
.and_then(|bindings| bindings.get(0).cloned())
.and_then(|bindings| bindings.first().cloned())
.and_then(|binding| binding.host_port.clone())
.and_then(|port| port.parse::<u16>().ok())
.ok_or_else(|| anyhow::anyhow!("Failed to get port for container."))?;
Expand Down

0 comments on commit e5030dc

Please sign in to comment.