diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-08-29 09:28:14 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-09-18 22:38:11 +0200 |
| commit | 541de45e2d6cbca39f16c4a865f1447af8ba585c (patch) | |
| tree | f05e6097b05f5e25084a14cc12292f9b638c3793 /format.sh | |
| parent | b572d0634b78d3de05ce39e5a49ce893c8065d6b (diff) | |
| download | mullvadvpn-541de45e2d6cbca39f16c4a865f1447af8ba585c.tar.xz mullvadvpn-541de45e2d6cbca39f16c4a865f1447af8ba585c.zip | |
Upgrade to rustfmt-nightly 0.2.6
Diffstat (limited to 'format.sh')
| -rwxr-xr-x | format.sh | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 "$@" |
