summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2023-01-24 09:02:23 +0100
committerLinus Färnstrand <linus@mullvad.net>2023-01-24 09:02:23 +0100
commit1ba20f4ed129377457db7c79ff5ec0133921afba (patch)
tree6c4628d6985ebb4dff5214913717f7032ee1477a
parent55641479e0fbee227f12b6ef7d32df455d8f69e1 (diff)
parent9345200ae58b8143c760e88fba333e9ef6ba1f37 (diff)
downloadmullvadvpn-1ba20f4ed129377457db7c79ff5ec0133921afba.tar.xz
mullvadvpn-1ba20f4ed129377457db7c79ff5ec0133921afba.zip
Merge branch 'rustfmt-on-stable'
-rw-r--r--.github/workflows/rustfmt.yml8
-rw-r--r--rustfmt.toml14
2 files changed, 12 insertions, 10 deletions
diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml
index 0ae5673aa5..456653dd38 100644
--- a/.github/workflows/rustfmt.yml
+++ b/.github/workflows/rustfmt.yml
@@ -7,23 +7,21 @@ on:
- rustfmt.toml
- '**/*.rs'
workflow_dispatch:
-env:
- RUST_NIGHTLY_TOOLCHAIN: nightly-2023-01-13
jobs:
check-formatting:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Install nightly Rust
uses: actions-rs/toolchain@v1.0.6
with:
- toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
+ toolchain: stable
components: rustfmt
default: true
- name: Check formatting
run: |-
rustfmt --version
- cargo fmt -- --check --unstable-features
+ cargo fmt -- --check
diff --git a/rustfmt.toml b/rustfmt.toml
index 84d8d52e28..0bb88037be 100644
--- a/rustfmt.toml
+++ b/rustfmt.toml
@@ -1,10 +1,14 @@
+edition = "2021"
+
# Activation of features, almost objectively better ;)
use_try_shorthand = true
use_field_init_shorthand = true
-condense_wildcard_suffixes = true
-normalize_comments = true
-wrap_comments = true
-imports_granularity = "Crate"
-# Heavily subjective style choices
+# Nightly only. Will not run in CI, but please format with these locally
+wrap_comments = true
+normalize_comments = true
comment_width = 100
+
+condense_wildcard_suffixes = true
+
+imports_granularity = "Crate"