Skip to content

Commit

Permalink
Add examples to doc when std is there
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Oct 14, 2022
1 parent 4246227 commit 276b6bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Expand Up @@ -8,8 +8,8 @@
//!
//! aHash uses the hardware AES instruction on x86 processors to provide a keyed hash function.
//! aHash is not a cryptographically secure hash.
//!
#![cfg_attr(any(feature = "compile-time-rng", feature = "runtime-rng"), doc = r##"
//!
#![cfg_attr(feature = "std", doc = r##"
# Example
```
use ahash::{AHasher, RandomState};
Expand Down
2 changes: 1 addition & 1 deletion src/random_state.rs
Expand Up @@ -301,7 +301,7 @@ impl BuildHasher for RandomState {
/// [AHasher]s that will return different hashcodes, but [Hasher]s created from the same [BuildHasher]
/// will generate the same hashes for the same input data.
///
#[cfg_attr(any(feature = "compile-time-rng", feature = "runtime-rng"), doc = r##" # Examples
#[cfg_attr(feature = "std", doc = r##" # Examples
```
use ahash::{AHasher, RandomState};
use std::hash::{Hasher, BuildHasher};
Expand Down

0 comments on commit 276b6bb

Please sign in to comment.