mirror of
https://github.com/openharmony/third_party_rust_hashbrown.git
synced 2026-06-30 21:07:54 -04:00
Address feedback
This commit is contained in:
+1
-1
@@ -32,7 +32,7 @@ matrix:
|
||||
rust: stable
|
||||
env: TARGET=x86_64-unknown-linux-gnu
|
||||
- name: "x86_64-unknown-linux-gnu (Rust 1.29.0)"
|
||||
rust: stable
|
||||
rust: 1.29.0
|
||||
env: TARGET=x86_64-unknown-linux-gnu
|
||||
- name: "i686-unknown-linux-gnu"
|
||||
env: TARGET=i686-unknown-linux-gnu CROSS=1
|
||||
|
||||
@@ -7,7 +7,7 @@ set -ex
|
||||
FEATURES="rayon,serde"
|
||||
if [ "${TRAVIS_RUST_VERSION}" = "nightly" ]; then
|
||||
FEATURES="${FEATURES},nightly"
|
||||
export RUSTFLAGS="$RUSTFLAGS --cfg hashbrown_deny_warnings"
|
||||
export RUSTFLAGS="$RUSTFLAGS -D warnings"
|
||||
fi
|
||||
|
||||
CARGO=cargo
|
||||
@@ -25,7 +25,7 @@ export RUSTFLAGS="$RUSTFLAGS --cfg hashbrown_deny_warnings"
|
||||
"${CARGO}" -vv test --target="${TARGET}" --features "${FEATURES}"
|
||||
|
||||
"${CARGO}" -vv test --target="${TARGET}" --release
|
||||
"${CARGO}" -vv test --target="${TARGET}" --features "${FEATURES}"
|
||||
"${CARGO}" -vv test --target="${TARGET}" --release --features "${FEATURES}"
|
||||
|
||||
if [ "${TRAVIS_RUST_VERSION}" = "nightly" ]; then
|
||||
# Run benchmark on native targets, build them on non-native ones:
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
doc-valid-idents = [ "CppCon", "SwissTable", "SipHash", "HashDoS" ]
|
||||
doc-valid-idents = [ "CppCon", "SwissTable", "SipHash", "HashDoS" ]
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
)
|
||||
)]
|
||||
#![warn(missing_docs)]
|
||||
#![cfg_attr(hashbrown_deny_warnings, deny(warnings))]
|
||||
#![allow(clippy::module_name_repetitions)]
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
+7
-1
@@ -3398,7 +3398,13 @@ mod test_map {
|
||||
|
||||
if let Err(AllocErr) = empty_bytes.try_reserve(MAX_USIZE / 8) {
|
||||
} else {
|
||||
panic!("usize::MAX / 8 should trigger an OOM!")
|
||||
// This may succeed if there is enough free memory. Attempt to
|
||||
// allocate a second hashmap to ensure the allocation will fail.
|
||||
let mut empty_bytes2: HashMap<u8, u8> = HashMap::new();
|
||||
if let Err(AllocErr) = empty_bytes2.try_reserve(MAX_USIZE / 8) {
|
||||
} else {
|
||||
panic!("usize::MAX / 8 should trigger an OOM!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user