Skip to content

Commit d0afe24

Browse files
committed
Address feedback
1 parent e1e837b commit d0afe24

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ matrix:
3232
rust: stable
3333
env: TARGET=x86_64-unknown-linux-gnu
3434
- name: "x86_64-unknown-linux-gnu (Rust 1.29.0)"
35-
rust: stable
35+
rust: 1.29.0
3636
env: TARGET=x86_64-unknown-linux-gnu
3737
- name: "i686-unknown-linux-gnu"
3838
env: TARGET=i686-unknown-linux-gnu CROSS=1

ci/run.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set -ex
77
FEATURES="rayon,serde"
88
if [ "${TRAVIS_RUST_VERSION}" = "nightly" ]; then
99
FEATURES="${FEATURES},nightly"
10-
export RUSTFLAGS="$RUSTFLAGS --cfg hashbrown_deny_warnings"
10+
export RUSTFLAGS="$RUSTFLAGS -D warnings"
1111
fi
1212

1313
CARGO=cargo
@@ -25,7 +25,7 @@ export RUSTFLAGS="$RUSTFLAGS --cfg hashbrown_deny_warnings"
2525
"${CARGO}" -vv test --target="${TARGET}" --features "${FEATURES}"
2626

2727
"${CARGO}" -vv test --target="${TARGET}" --release
28-
"${CARGO}" -vv test --target="${TARGET}" --features "${FEATURES}"
28+
"${CARGO}" -vv test --target="${TARGET}" --release --features "${FEATURES}"
2929

3030
if [ "${TRAVIS_RUST_VERSION}" = "nightly" ]; then
3131
# Run benchmark on native targets, build them on non-native ones:

clippy.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
doc-valid-idents = [ "CppCon", "SwissTable", "SipHash", "HashDoS" ]
1+
doc-valid-idents = [ "CppCon", "SwissTable", "SipHash", "HashDoS" ]

src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
)
2424
)]
2525
#![warn(missing_docs)]
26-
#![cfg_attr(hashbrown_deny_warnings, deny(warnings))]
2726
#![allow(clippy::module_name_repetitions)]
2827

2928
#[cfg(test)]

src/map.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -3398,7 +3398,13 @@ mod test_map {
33983398

33993399
if let Err(AllocErr) = empty_bytes.try_reserve(MAX_USIZE / 8) {
34003400
} else {
3401-
panic!("usize::MAX / 8 should trigger an OOM!")
3401+
// This may succeed if there is enough free memory. Attempt to
3402+
// allocate a second hashmap to ensure the allocation will fail.
3403+
let mut empty_bytes2: HashMap<u8, u8> = HashMap::new();
3404+
if let Err(AllocErr) = empty_bytes2.try_reserve(MAX_USIZE / 8) {
3405+
} else {
3406+
panic!("usize::MAX / 8 should trigger an OOM!");
3407+
}
34023408
}
34033409
}
34043410

0 commit comments

Comments
 (0)