Replace cargo-fmt with dprint

If we want to use stable Rust, we can't use cargo-fmt with nightly
features.
This commit is contained in:
Thomas Eizinger 2021-05-25 14:40:31 +10:00
parent b8cb9e1b8b
commit 694ade11d1
No known key found for this signature in database
GPG Key ID: 651AC83A6C6C8B96
4 changed files with 16 additions and 19 deletions

View File

@ -17,9 +17,6 @@ jobs:
- uses: Swatinem/rust-cache@v1.2.0
- name: Check code formatting
run: cargo fmt --all -- --check
- name: Check formatting
uses: dprint/check@v1.4

View File

@ -4,10 +4,22 @@
"incremental": true,
"markdown": {
},
"includes": ["**/*.{md}", "**/*.{toml}"],
"excludes": [ ],
"rustfmt": {
"edition": 2018,
"condense_wildcard_suffixes": true,
"format_macro_matchers": true,
"imports_granularity" : "Module",
"use_field_init_shorthand": true,
"format_code_in_doc_comments": true,
"normalize_comments": true,
"wrap_comments": true,
"overflow_delimited_expr": true
},
"includes": ["**/*.{md}", "**/*.{toml}", "**/*.{rs}"],
"excludes": [ "target/" ],
"plugins": [
"https://plugins.dprint.dev/markdown-0.6.1.wasm",
"https://github.com/thomaseizinger/dprint-plugin-cargo-toml/releases/download/0.1.0/cargo-toml-0.1.0.wasm"
"https://github.com/thomaseizinger/dprint-plugin-cargo-toml/releases/download/0.1.0/cargo-toml-0.1.0.wasm",
"https://plugins.dprint.dev/rustfmt-0.4.0.exe-plugin@c6bb223ef6e5e87580177f6461a0ab0554ac9ea6b54f78ea7ae8bf63b14f5bc2"
]
}

View File

@ -1,4 +1,4 @@
[toolchain]
channel = "nightly-2021-01-31"
components = ["rustfmt", "clippy"]
components = ["clippy"]
targets = ["armv7-unknown-linux-gnueabihf"]

View File

@ -1,12 +0,0 @@
edition = "2018"
condense_wildcard_suffixes = true
format_macro_matchers = true
imports_granularity = "Module"
use_field_init_shorthand = true
format_code_in_doc_comments = true
normalize_comments = true
wrap_comments = true
overflow_delimited_expr = true
ignore = [
"tokio-tar"
]