Skip to content

Commit

Permalink
fix(console): remove trailing space from task/resource location (#443)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
hds authored and hawkw committed Sep 29, 2023
1 parent 8eb2a2a commit 90e5918
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tokio-console/src/state/mod.rs
Expand Up @@ -522,7 +522,7 @@ fn format_location(loc: Option<proto::Location>) -> String {
let truncated = truncate_registry_path(file);
l.file = Some(truncated);
}
format!("{} ", l)
l.to_string()
})
.unwrap_or_else(|| "<unknown location>".to_string())
}
Expand Down

0 comments on commit 90e5918

Please sign in to comment.