summaryrefslogtreecommitdiffhomepage
path: root/format.sh
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2017-08-29 09:28:14 +0200
committerLinus Färnstrand <linus@mullvad.net>2017-09-18 22:38:11 +0200
commit541de45e2d6cbca39f16c4a865f1447af8ba585c (patch)
treef05e6097b05f5e25084a14cc12292f9b638c3793 /format.sh
parentb572d0634b78d3de05ce39e5a49ce893c8065d6b (diff)
downloadmullvadvpn-541de45e2d6cbca39f16c4a865f1447af8ba585c.tar.xz
mullvadvpn-541de45e2d6cbca39f16c4a865f1447af8ba585c.zip
Upgrade to rustfmt-nightly 0.2.6
Diffstat (limited to 'format.sh')
-rwxr-xr-xformat.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/format.sh b/format.sh
index 0a899a7f73..b14aa48458 100755
--- a/format.sh
+++ b/format.sh
@@ -5,16 +5,16 @@
set -u
-VERSION="0.8.3"
+VERSION="0.2.6"
CMD="rustfmt"
-INSTALL_CMD="cargo install --vers $VERSION --force $CMD"
+INSTALL_CMD="cargo install --vers $VERSION --force rustfmt-nightly"
function correct_rustfmt() {
if ! which $CMD; then
echo "$CMD is not installed" >&2
return 1
fi
- local installed_version=$($CMD --version | cut -d' ' -f1)
+ local installed_version=$($CMD --version | cut -d'-' -f1)
if [[ "$installed_version" != "$VERSION" ]]; then
echo "Wrong version of $CMD installed. Expected $VERSION, got $installed_version" >&2
return 1
@@ -31,4 +31,4 @@ else
shift
fi
-find . -iname "*.rs" -not -path "*/target/*" -print0 | xargs -0 -n1 rustfmt "$@"
+find . -iname "*.rs" -not -path "*/target/*" -print0 | xargs -0 -n1 rustfmt --skip-children "$@"