[go: up one dir, main page]

runtime 0.3.0-alpha.8

[deprecated] Empowering everyone to build asynchronous software.
Documentation
jobs:
- job: rustfmt
  displayName: ${{ parameters.displayName }}
  pool:
    vmImage: ubuntu-16.04
  steps:
    - template: install-rust.yml
      parameters:
        rust_version: nightly
    - script: |
        if ! rustup component add rustfmt; then
          target=`curl https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/rustfmt`;
          echo "'rustfmt' is unavailable on the toolchain 'nightly', use the toolchain 'nightly-$target' instead";
          rustup toolchain install nightly-$target;
          rustup default nightly-$target;
          rustup component add rustfmt;
        fi
      displayName: Install rustfmt
    - script: |
        cargo fmt --all -- --check --unstable-features
      displayName: Check formatting