Skip to content
This repository was archived by the owner on Oct 9, 2018. It is now read-only.

Not using whitespace for mid-line alignment. #16

Merged
merged 1 commit into from
Jul 8, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions style/whitespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,31 @@ foo_bar(x, y, |z| {
> }
> }
> ```

### Alignment

Idiomatic code should not use extra whitespace in the middle of a line
to provide alignment.


``` rust
// Good
struct Foo {
short: f64,
really_long: f64,
}

// Bad
struct Bar {
short: f64,
really_long: f64,
}

// Good
let a = 0;
let radius = 7;

// Bad
let b = 0;
let diameter = 7;
```