diff --git a/.rustfmt.toml b/.rustfmt.toml new file mode 100644 index 00000000..32a9786f --- /dev/null +++ b/.rustfmt.toml @@ -0,0 +1 @@ +edition = "2018" diff --git a/.travis.yml b/.travis.yml index 9c3c0004..b18175df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,14 +2,16 @@ language: rust sudo: false matrix: include: - - rust: 1.32.0 - - rust: 1.34.2 + - rust: 1.36.0 - rust: stable env: - FEATURES='serde-1' - rust: stable env: - FEATURES='rayon' + - rust: stable + env: + - FEATURES='std' - rust: beta - rust: nightly env: @@ -41,7 +43,7 @@ script: cargo build --verbose --features "$FEATURES" && if [ -z "$SKIP_TEST" ]; then cargo test --verbose --features "$FEATURES" && - cargo test --release --verbose --features "$FEATURES" + cargo test --release --verbose --features "$FEATURES" && if [ "$FEATURES" = "serde-1" ]; then cargo test --verbose -p test-serde && cargo test --release --verbose -p test-serde diff --git a/Cargo.toml b/Cargo.toml index 5823a0f4..58a17304 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "indexmap" edition = "2018" -version = "1.5.1" +version = "1.6.0" authors = [ "bluss", "Josh Stone " @@ -37,7 +37,7 @@ serde = { version = "1.0", optional = true, default-features = false } rayon = { version = "1.0", optional = true } [dependencies.hashbrown] -version = "0.8.1" +version = "0.9.0" default-features = false features = ["raw"] @@ -53,6 +53,9 @@ fxhash = "0.2.1" # Serialization with serde 1.0 serde-1 = ["serde"] +# Force the use of `std`, bypassing target detection. +std = [] + # for testing only, of course test_low_transition_point = [] test_debug = [] diff --git a/README.rst b/README.rst index 5fbab927..2c489850 100644 --- a/README.rst +++ b/README.rst @@ -66,6 +66,20 @@ which is roughly: Recent Changes ============== +- 1.6.0 + + - **MSRV**: Rust 1.36 or later is now required. + + - The ``hashbrown`` dependency has been updated to version 0.9. + +- 1.5.2 + + - The new "std" feature will force the use of ``std`` for users that explicitly + want the default ``S = RandomState``, bypassing the autodetection added in 1.3.0, + by @cuviper in PR 145_. + +.. _145: https://github.com/bluss/indexmap/pull/145 + - 1.5.1 - Values can now be indexed by their ``usize`` position by @cuviper in PR 132_. diff --git a/build.rs b/build.rs index 645c0f1c..9f9fa054 100644 --- a/build.rs +++ b/build.rs @@ -1,5 +1,8 @@ fn main() { - let ac = autocfg::new(); - ac.emit_sysroot_crate("std"); + // If "std" is explicitly requested, don't bother probing the target for it. + match std::env::var_os("CARGO_FEATURE_STD") { + Some(_) => autocfg::emit("has_std"), + None => autocfg::new().emit_sysroot_crate("std"), + } autocfg::rerun_path("build.rs"); }