Skip to content

Commit

Permalink
docs(contributing.md): add a comment to make good use of `rust-analyz…
Browse files Browse the repository at this point in the history
…er` (#3388)
  • Loading branch information
HuSharp authored Nov 7, 2023
1 parent 5571711 commit 837c277
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,26 @@ You want to contribute? You're awesome! Don't know where to start? Check the [li

[easy tag]: https://github.com/hyperium/hyper/issues?q=label%3AE-easy+is%3Aopen


## [Pull Requests](./docs/PULL_REQUESTS.md)

- [Submitting a Pull Request](./docs/PULL_REQUESTS.md#submitting-a-pull-request)
- [Commit Guidelines](./docs/COMMITS.md)

## Cargo fmt

`cargo fmt --all` does not work in hyper. Please use the following commands:

```txt
# Mac or Linux
rustfmt --check --edition 2018 $(git ls-files '*.rs')
# Powershell
Get-ChildItem . -Filter "*.rs" -Recurse | foreach { rustfmt --check --edition 2018 $_.FullName }
```
```

> **NOTE**: If you are using `rust-analyzer`, you can add the following two lines in your `settings.json` to make sure the features get taken into account when checking the project:
>
> ```json
> "rust-analyzer.cargo.features": ["full"],
> "rust-analyzer.check.features": ["full"],
> ```

0 comments on commit 837c277

Please sign in to comment.