message: add rustfmt check in travis
diff: @@ -2,6 +2,9 @@ language: rust
  cache: cargo
  matrix:
  include:
  + - rust: nighlyt
  + os: linux
  + env: CHECK_RUSTFMT="true"
  - rust: stable
  os: windows
  env: CARDANO_C="false" CARDANO_WASM="false" RUN_TEST="true"
  @@ -17,13 +20,25 @@ matrix:
  - rust: nightly
  env: TARGET="wasm32-unknown-unknown" CARDANO_C="false" CARDANO_WASM="true" RUN_TEST="false"
  os: linux
  + allow_failures:
  + - rust: nighlyt
  + os: linux
  + env: CHECK_RUSTFMT="true"
  before_script:
  - |
  if [ "${CARDANO_WASM}" = "true" ]; then
  rustup target add ${TARGET} --toolchain nightly
  fi
  + - |
  + if [ "${CHECK_RUSTFMT}" = "true" ]; then
  + rustup component add rustfmt-preview
  + fi
  script:
  + - |
  + if [ "${CHECK_RUSTFMT}" = "true" ]; then
  + cargo fmt --package=protocol-tokio --package=protocol --package=storage-units --package=cardano-storage -- --check
  + fi
  - if [ "${RUN_TEST}" = "true" ]; then cargo build --verbose --all && cargo test --verbose --all; fi
  - if [ "${CARDANO_C}" = "true" ]; then ./cardano-c/test.sh; fi
  - |
  