summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2018-01-19 12:45:44 +0100
committerLinus Färnstrand <linus@mullvad.net>2018-01-19 13:22:24 +0100
commit86ee85666d000013b84ae01bf580eb90d75455f9 (patch)
tree054a1f322f22c5aa90768b440a5913e0ea8f02ad
parent257a5e1e1a0f5a996840c19aeaab1856f805c3fc (diff)
downloadmullvadvpn-86ee85666d000013b84ae01bf580eb90d75455f9.tar.xz
mullvadvpn-86ee85666d000013b84ae01bf580eb90d75455f9.zip
Upgrade rustfmt to 0.3.6 and move version
-rwxr-xr-xformat.sh4
-rw-r--r--rustfmt.toml2
2 files changed, 4 insertions, 2 deletions
diff --git a/format.sh b/format.sh
index cc82f8e25a..4bc0eff2d5 100755
--- a/format.sh
+++ b/format.sh
@@ -5,7 +5,7 @@
set -u
-VERSION="0.3.5"
+VERSION=`grep "required_version" rustfmt.toml | cut -f2 -d'"'`
CMD="rustfmt"
INSTALL_CMD="cargo install --vers $VERSION --force rustfmt-nightly"
@@ -37,5 +37,5 @@ else
shift
fi
-echo "Formatting..."
+echo "Formatting with $VERSION..."
cargo +nightly fmt -- "$@"
diff --git a/rustfmt.toml b/rustfmt.toml
index 75d71f4a8d..4af6ba9f6d 100644
--- a/rustfmt.toml
+++ b/rustfmt.toml
@@ -1,3 +1,5 @@
+required_version = "0.3.6"
+
# Activation of features, almost objectively better ;)
reorder_imports = true
reorder_imported_names = true