File tree 1 file changed +11
-9
lines changed 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -114,24 +114,26 @@ $ cargo test -p tests_expectations
114
114
115
115
## Automatic code formatting
116
116
117
- There's a ` rustfmt.toml ` file in the repo. Ideally changes should be consistent
118
- with the style, though that's not enforced right now.
117
+ We use [ ` rustfmt ` ] ( https://github.com/rust-lang-nursery/rustfmt ) to enforce a
118
+ consistent code style across the whole ` bindgen ` code base. This is enforced in
119
+ CI, and your pull requests will get automatically rejected if you don't
120
+ re-format with the latest ` rustfmt ` before pushing.
119
121
120
- [ ` rustfmt ` ] ( https://github.com/rust-lang-nursery/rustfmt ) can catch and fix
121
- automatically all the coding style issues it finds. In order to use it it
122
- suffices to do:
122
+ You can install the latest version of ` rustfmt ` with this command:
123
123
124
124
```
125
- $ cargo fmt
125
+ $ cargo install -f rustfmt
126
126
```
127
127
128
- For it to work, you need to have ` rustfmt ` installed. To do so:
128
+ Ensure that ` ~/.cargo/bin ` is on your path.
129
+
130
+ Once that is taken care of, you can (re)format all code by running this command:
129
131
130
132
```
131
- $ cargo install rustfmt
133
+ $ cargo fmt
132
134
```
133
135
134
- And ensure ` ~/.cargo/bin ` is on your path .
136
+ The code style is described in the ` rustfmt.toml ` file in top level of the repo .
135
137
136
138
## Debug Logging
137
139
You can’t perform that action at this time.
0 commit comments