Skip to content

Commit

Permalink
Update rs/src/management/http_client.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Connor Peet <[email protected]>
  • Loading branch information
jfullerton44 and connor4312 authored Oct 12, 2023
1 parent b214852 commit fe00906
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions rs/src/management/http_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,7 @@ impl TunnelManagementClient {

let request = self.make_tunnel_request(Method::GET, url, options).await?;
let response: TunnelListByRegionResponse = self.execute_json("list_all_tunnels", request).await?;
let mut tunnels = Vec::new();
for region in response.value {
tunnels.extend(region.value);
}
Ok(tunnels)
Ok(response.value.into_iter().flat_map(|v| v.value).collect())
}

/// Lists tunnels owned by the user in a specific cluster.
Expand Down

0 comments on commit fe00906

Please sign in to comment.