summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2017-12-04 12:31:34 +0100
committerLinus Färnstrand <linus@mullvad.net>2017-12-04 12:31:34 +0100
commit2b911670623d527c39121f35d428f857c1bcb5ea (patch)
tree5aa68a3cc7e5b72735c7bb03b7c19d4a05d0d6b2
parent6f3ea40d003400a4b5802f12e119805c7f9b3fb7 (diff)
downloadmullvadvpn-2b911670623d527c39121f35d428f857c1bcb5ea.tar.xz
mullvadvpn-2b911670623d527c39121f35d428f857c1bcb5ea.zip
Fix format.sh to use cargo fmt
-rwxr-xr-xformat.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/format.sh b/format.sh
index 87e3d80014..ee72288862 100755
--- a/format.sh
+++ b/format.sh
@@ -10,9 +10,9 @@ CMD="rustfmt"
INSTALL_CMD="cargo install --vers $VERSION --force rustfmt-nightly"
case "$(uname -s)" in
- Linux*) export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib;;
- Darwin*) export DYLD_LIBRARY_PATH=$(rustc --print sysroot)/lib;;
- *) exit 1
+ Linux*) export LD_LIBRARY_PATH=$(rustc +nightly --print sysroot)/lib;;
+ Darwin*) export DYLD_LIBRARY_PATH=$(rustc +nightly --print sysroot)/lib;;
+ *) echo "Unsupported platform"; exit 1
esac
# Allow rustfmt to use "nighly" features. `comment_width` is one of those for example.
@@ -41,4 +41,5 @@ else
shift
fi
-find . -iname "*.rs" -not -path "*/target/*" -print0 | xargs -0 -n1 rustfmt --skip-children "$@"
+echo "Formatting..."
+cargo +nightly fmt