Skip to content

Commit 04e77f9

Browse files
authored
Merge pull request #112 from shepmaster/doc-tweaks
Improve docs for XxHash3_128
2 parents 067e391 + 7c176ff commit 04e77f9

2 files changed

Lines changed: 16 additions & 11 deletions

File tree

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A Rust implementation of the [xxHash] algorithm.
1616
# Examples
1717

1818
These examples use [`XxHash64`][] but the same ideas can be
19-
used for [`XxHash32`][] or [`XxHash3_64`][].
19+
used for [`XxHash32`][], [`XxHash3_64`][], or [`XxHash3_128`][].
2020

2121
## Hashing arbitrary data
2222

@@ -82,15 +82,16 @@ assert_eq!(hash.get(&42), Some(&"the answer"));
8282

8383
# Feature Flags
8484

85-
| name | description |
86-
|------------|---------------------------------------------------------------------------------------------------------|
87-
| xxhash32 | Include the [`XxHash32`][] algorithm |
88-
| xxhash64 | Include the [`XxHash64`][] algorithm |
89-
| xxhash3_64 | Include the [`XxHash3_64`][] algorithm |
90-
| random | Create random instances of the hashers |
91-
| serialize | Serialize and deserialize hasher state with Serde |
92-
| std | Use the Rust standard library. Enable this if you want SIMD support in [`XxHash3_64`][] |
93-
| alloc | Use the Rust allocator library. Enable this if you want to create [`XxHash3_64`][] with dynamic secrets |
85+
| name | description |
86+
|-------------|-------------------------------------------------------------------------------------------------------------------------------|
87+
| xxhash32 | Include the [`XxHash32`][] algorithm |
88+
| xxhash64 | Include the [`XxHash64`][] algorithm |
89+
| xxhash3_64 | Include the [`XxHash3_64`][] algorithm |
90+
| xxhash3_128 | Include the [`XxHash3_128`][] algorithm |
91+
| random | Create random instances of the hashers |
92+
| serialize | Serialize and deserialize hasher state with Serde |
93+
| std | Use the Rust standard library. Enable this if you want SIMD support in [`XxHash3_64`][] or [`XxHash3_128`][] |
94+
| alloc | Use the Rust allocator library. Enable this if you want to create [`XxHash3_64`][] or [`XxHash3_128`][] with dynamic secrets |
9495

9596
# Benchmarks
9697

@@ -114,3 +115,4 @@ See benchmarks in the [comparison][] README.
114115
[`XxHash32`]: crate::XxHash32
115116
[`XxHash64`]: crate::XxHash64
116117
[`XxHash3_64`]: crate::XxHash3_64
118+
[`XxHash3_128`]: crate::XxHash3_128

src/xxhash3_128.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ pub use crate::xxhash3::{
1717
};
1818

1919
/// Calculates the 128-bit hash.
20+
///
21+
/// This type does not implement [`std::hash::Hasher`] as that trait
22+
/// requires a 64-bit result while this computes a 128-bit result.
2023
#[derive(Clone)]
21-
/// TODO: does not implement hash.
2224
pub struct Hasher {
2325
#[cfg(feature = "alloc")]
2426
inner: AllocRawHasher,
@@ -83,6 +85,7 @@ impl Hasher {
8385
Ok(impl_oneshot(secret, seed, input))
8486
}
8587
}
88+
8689
#[cfg(feature = "alloc")]
8790
#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))]
8891
mod with_alloc {

0 commit comments

Comments
 (0)