anymap/test
Chris Morgan 40e60cefd6 Resolve the std/hashbrown conflict situation
Big diff, but it’s mostly just whitespace changes; ignore whitespace and
it’s much smaller, though still not as tiny as it could potentially be.

Essentially, this just duplicates everything for the hashbrown variant.

It’d be possible to use generic associated types to achieve this without
the duplication, but that depends on currently-unstable features, and is
probably slightly more painful to use anyway. I’ll keep the approach in
mind for a possible version 2, but for now this is the pragmatic route.
2022-02-22 13:50:22 +11:00

26 lines
830 B
Bash
Executable file
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
set -e
export RUSTFLAGS="-D warnings"
export RUSTDOCFLAGS="-D warnings"
run_tests() {
for release in "" "--release"; do
cargo $1 test $release --no-default-features # Not very useful without std or hashbrown, but hey, it works! (Doctests emit an error about needing a global allocator, but it exits zero anyway. ¯\_(ツ)_/¯)
cargo $1 test $release --no-default-features --features hashbrown
cargo $1 test $release
cargo $1 test $release --all-features
done
}
# Wed like to test with the oldest declared-supported version of *all* our dependencies.
# That means Rust 1.36.0 + hashbrown 0.1.1.
# Hence the different lock file.
# (Also Rust 1.36.0 cant read the latest lock file format.)
cp test-oldest-Cargo.lock Cargo.lock
run_tests +1.36.0
rm Cargo.lock
run_tests
cargo clippy
cargo bench
cargo doc