diff --git a/pageserver/src/http/routes.rs b/pageserver/src/http/routes.rs
index f1318cb325..2b4ad86310 100644
--- a/pageserver/src/http/routes.rs
+++ b/pageserver/src/http/routes.rs
@@ -145,9 +145,9 @@ fn list_local_timelines(
let timelines = tenant.list_timelines();
let mut local_timeline_info = Vec::with_capacity(timelines.len());
- for (timeline_id, repository_timeline) in timelines {
+ for repository_timeline in timelines {
local_timeline_info.push((
- timeline_id,
+ repository_timeline.timeline_id,
local_timeline_info_from_timeline(
&repository_timeline,
include_non_incremental_logical_size,
@@ -218,7 +218,8 @@ async fn timeline_list_handler(request: Request
) -> Result,
.map_err(|e: JoinError| ApiError::InternalServerError(e.into()))??;
let mut response_data = Vec::with_capacity(timelines.len());
- for (timeline_id, timeline) in timelines {
+ for timeline in timelines {
+ let timeline_id = timeline.timeline_id;
let local = match local_timeline_info_from_timeline(
&timeline,
include_non_incremental_logical_size,
diff --git a/pageserver/src/tenant.rs b/pageserver/src/tenant.rs
index 4da5790f51..994e1db47b 100644
--- a/pageserver/src/tenant.rs
+++ b/pageserver/src/tenant.rs
@@ -144,12 +144,12 @@ impl Tenant {
/// Lists timelines the tenant contains.
/// Up to tenant's implementation to omit certain timelines that ar not considered ready for use.
- pub fn list_timelines(&self) -> Vec<(TimelineId, Arc)> {
+ pub fn list_timelines(&self) -> Vec> {
self.timelines
.lock()
.unwrap()
- .iter()
- .map(|(timeline_id, timeline_entry)| (*timeline_id, Arc::clone(timeline_entry)))
+ .values()
+ .map(Arc::clone)
.collect()
}