ndaxrs 0.1.0

Rust client library for the NDAX cryptocurrency exchange API
Documentation
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env bash
set -euo pipefail

echo "[pre-commit] Running cargo fmt --all"
cargo fmt --all

# Re-stage Rust files that were already staged before formatting.
mapfile -t staged_rs_files < <(git diff --cached --name-only --diff-filter=ACMR -- '*.rs')
if [ "${#staged_rs_files[@]}" -gt 0 ]; then
  git add -- "${staged_rs_files[@]}"
fi