mirror of
https://github.com/hyperium/hyper.git
synced 2026-01-25 10:26:13 +00:00
652 B
652 B
Code Style
hyper uses the default configuration of rustfmt.
cargo fmt
cargo fmt --all does not work in hyper. Please use the following commands:
# Mac or Linux
rustfmt --check --edition 2021 $(git ls-files '*.rs')
# Powershell
Get-ChildItem . -Filter "*.rs" -Recurse | foreach { rustfmt --check --edition 2021 $_.FullName }
Note
: If you are using
rust-analyzer, you can add the following two lines in yoursettings.jsonto make sure the features get taken into account when checking the project:"rust-analyzer.cargo.features": ["full"], "rust-analyzer.check.features": ["full"],