From 2ce3d81a30bc3034682c30fcdcbe972b71838794 Mon Sep 17 00:00:00 2001 From: baul Date: Fri, 18 Aug 2023 22:52:00 +0800 Subject: [PATCH] fix(console): fix task detail view Id to display remote tokio::task::Id (#455) In #403, the tasks list view was changed to display the `tokio::task::Id` of the task, instead of the tokio-console generated display ID (which isn't stable across restarts of the tokio-console itself. However, the task detail view wasn't updated and was still using the display ID. This change fixes the ID displayed in the task detail view so that it also displays the `tokio::task::Id` of the task. --- tokio-console/src/view/task.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio-console/src/view/task.rs b/tokio-console/src/view/task.rs index 9713eecbb..8f3024520 100644 --- a/tokio-console/src/view/task.rs +++ b/tokio-console/src/view/task.rs @@ -142,7 +142,7 @@ impl TaskView { let mut overview = Vec::with_capacity(8); overview.push(Spans::from(vec![ bold("ID: "), - Span::raw(format!("{} ", task.id())), + Span::raw(format!("{} ", task.id_str())), task.state().render(styles), ]));