From 90e591887414e9a1435a709454486c340b50cd44 Mon Sep 17 00:00:00 2001 From: Hayden Stainsby Date: Mon, 3 Jul 2023 19:45:52 +0200 Subject: [PATCH] fix(console): remove trailing space from task/resource location (#443) * fix(console): remove trailing space from task/resource location When a file location is formatted, an extra space is added at the end. This appears to be the result of some refactoring from a case where we needed the extra space at the end. Currently, the extra space results in there being 2 spaces between the Location column and the Fields column in the tasks list view, and the same between the Location column and the Attributes column in the resources list view. It is also causing issues when attempting to truncate the first part of the location in #441 (during which this extra space was discovered). This change removes the trailing space. --- tokio-console/src/state/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio-console/src/state/mod.rs b/tokio-console/src/state/mod.rs index 86dc24e11..982e816b9 100644 --- a/tokio-console/src/state/mod.rs +++ b/tokio-console/src/state/mod.rs @@ -522,7 +522,7 @@ fn format_location(loc: Option) -> String { let truncated = truncate_registry_path(file); l.file = Some(truncated); } - format!("{} ", l) + l.to_string() }) .unwrap_or_else(|| "".to_string()) }