mirror of
https://github.com/static-web-server/static-web-server.git
synced 2026-01-25 05:06:33 +00:00
* chore: format Markdown files with mdformat * chore: switch to mdformat config file * chore: add missing trailing slash * docs: add section about formatting Markdown files
654 B
654 B
Code Style
SWS uses the default configuration of rustfmt.
cargo fmt
cargo fmt --all does not work in SWS. Please use the following commands:
Linux/BSDs
rustfmt --check --edition 2021 $(git ls-files '*.rs')
Windows
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"],