diff=$(cargo fmt --all -- --check)
result=$?
if [[ ${result} -ne 0 ]] ; then
cat <<\EOF
There are some code style issues, run `cargo fmt` first.
EOF
fi
if ! cargo test --all --all-features
then
echo "test failed"
exit 1
fi
diff=$(cargo fmt --all -- --check)
result=$?
if [[ ${result} -ne 0 ]] ; then
cat <<\EOF
There are some code style issues, run `cargo fmt` first.
EOF
exit 1
fi