diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 28e66960b..34482da42 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -17,11 +17,11 @@ jobs: - uses: actions/checkout@28c7f3d2b5162b5ddd3dfd9a45aa55eaf396478b - uses: actions-rs/toolchain@b223206e28798aa3c3668bdd6409258e6dc29172 with: - toolchain: nightly-2020-06-02 + toolchain: nightly-2020-07-26 default: false components: rustfmt - name: Check style - run: cargo +nightly-2020-06-02 fmt -- --check + run: cargo +nightly-2020-07-26 fmt -- --check build-and-test: runs-on: ${{ matrix.os }} diff --git a/.vscode/settings.json b/.vscode/settings.json index fdfa83174..aa647e78a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,7 +2,7 @@ "rust-analyzer.rustfmt.overrideCommand": [ "rustup", "run", - "nightly-2020-06-02", + "nightly-2020-07-26", "rustfmt" ] } diff --git a/README.adoc b/README.adoc index d9f291cdb..aa8aa0868 100644 --- a/README.adoc +++ b/README.adoc @@ -16,13 +16,28 @@ $ cargo +nightly doc ---- -== Build and run +== Contributing + +=== Building and testing You can **build and run the whole test suite** with `cargo test`. The test suite runs cleanly and should remain clean. -You can **format the code** using `cargo +nightly fmt`. Make sure to run this -before pushing changes. The CI checks that the code is correctly formatted. +=== Code formatting + +Dropshot works with stable Rust versions, but for consistency the code is +_formatted_ with a specific version of `rustfmt`. To contribute to Dropshot, +you will need to have installed the `nightly-2020-07-26` version of the Rust +toolchain: + +---- +$ rustup install nightly-2020-07-26 +---- + +You can then **format the code** using `cargo +nightly-2020-07-26 fmt` or +`rustfmt +nightly-2020-07-26`. Make sure to run this before pushing changes. +The CI uses this version of `rustfmt` to check that the code is correctly +formatted. == Configuration reference diff --git a/rustfmt.toml b/rustfmt.toml index 852e30fef..391cb7aac 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -83,7 +83,7 @@ use_field_init_shorthand = false force_explicit_abi = true condense_wildcard_suffixes = false color = "Auto" -required_version = "1.4.15" +required_version = "1.4.19" disable_all_formatting = false skip_children = false hide_parse_errors = false