Skip to content

Commit

Permalink
fix(console): remove trailing space from task/resource location
Browse files Browse the repository at this point in the history
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 committed Jul 3, 2023
1 parent 2de5b68 commit 27a572d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tokio-console/src/state/mod.rs
Original file line number Diff line number Diff line change
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)
format!("{}", l)
})
.unwrap_or_else(|| "<unknown location>".to_string())
}
Expand Down

0 comments on commit 27a572d

Please sign in to comment.