summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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