diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-12-04 12:31:34 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-12-04 12:31:34 +0100 |
| commit | 2b911670623d527c39121f35d428f857c1bcb5ea (patch) | |
| tree | 5aa68a3cc7e5b72735c7bb03b7c19d4a05d0d6b2 | |
| parent | 6f3ea40d003400a4b5802f12e119805c7f9b3fb7 (diff) | |
| download | mullvadvpn-2b911670623d527c39121f35d428f857c1bcb5ea.tar.xz mullvadvpn-2b911670623d527c39121f35d428f857c1bcb5ea.zip | |
Fix format.sh to use cargo fmt
| -rwxr-xr-x | format.sh | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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 |
