Closed
Description
When rustfmt complains when there are spaces at the end of the line, it is impossible to see in the diff, since these are, well, whitespaces. Note that in this markdown view you can clearly see the space due to syntax highlighting, but in actual terminal (at least in my Ubuntu setup), the background is black, and the syntax highlighting is done on the fore-color, so the whitespaces are not visible after all.
I think it should show the excess whitespaces in some visible form.
Linting with cargo fmt...
Diff in /build/src/clients/foo.rs at line 83:
let url = request.url.as_str();
let mut default_url = format!("{}{}", DEFAULT_URL_TEMPLATE, url);
let service_header = get_service_header();
- if service_header.is_none() {
+ if service_header.is_none() {
return default_url;
};
let mut headers = HeaderMap::new();
Use cargo fmt to format your code
So for example it can look like this:
Linting with cargo fmt...
Diff in /build/src/clients/foo.rs at line 83:
let url = request.url.as_str();
let mut default_url = format!("{}{}", DEFAULT_URL_TEMPLATE, url);
let service_header = get_service_header();
- if service_header.is_none() {␣␣␣
+ if service_header.is_none() {
return default_url;
};
let mut headers = HeaderMap::new();
Use cargo fmt to format your code
Metadata
Metadata
Assignees
Labels
No labels