Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support fixed seed #131

Merged
merged 4 commits into from Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/rust.yml
Expand Up @@ -32,6 +32,11 @@ jobs:
with:
command: test
args: --no-default-features --features compile-time-rng
- name: check fixed-seed
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features --features std
- name: check
uses: actions-rs/cargo@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Expand Up @@ -10,7 +10,7 @@
//! aHash is not a cryptographically secure hash.
//!
#![cfg_attr(
any(feature = "compile-time-rng", feature = "runtime-rng"),
feature = "std",
doc = r##"
# Example
```
Expand Down
4 changes: 1 addition & 3 deletions src/random_state.rs
Expand Up @@ -212,7 +212,6 @@ impl fmt::Debug for RandomState {
impl RandomState {
/// Use randomly generated keys
#[inline]
#[cfg(any(feature = "compile-time-rng", feature = "runtime-rng"))]
pub fn new() -> RandomState {
let src = get_src();
let fixed = get_fixed_seeds();
Expand Down Expand Up @@ -296,7 +295,6 @@ impl RandomState {
}
}

#[cfg(any(feature = "compile-time-rng", feature = "runtime-rng"))]
impl Default for RandomState {
#[inline]
fn default() -> Self {
Expand All @@ -313,7 +311,7 @@ impl BuildHasher for RandomState {
/// will generate the same hashes for the same input data.
///
#[cfg_attr(
any(feature = "compile-time-rng", feature = "runtime-rng"),
feature = "std",
doc = r##" # Examples
```
use ahash::{AHasher, RandomState};
Expand Down