From 27a572d0f16be515cf4213780846c818a6da17c6 Mon Sep 17 00:00:00 2001 From: Hayden Stainsby Date: Mon, 3 Jul 2023 16:26:53 +0200 Subject: [PATCH] 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..236d97590 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) + format!("{}", l) }) .unwrap_or_else(|| "".to_string()) }