Skip to content

Commit

Permalink
update rustfmt from 2020-06-02 to 2020-07-26 (oxidecomputer#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
jclulow authored Jan 4, 2021
1 parent e4402dc commit ca121ae
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"rust-analyzer.rustfmt.overrideCommand": [
"rustup",
"run",
"nightly-2020-06-02",
"nightly-2020-07-26",
"rustfmt"
]
}
21 changes: 18 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ca121ae

Please sign in to comment.