.tangled/workflows/test.yml
.tangled/workflows/test.yml
This file has not been changed.
Cargo.lock
Cargo.lock
This file has not been changed.
Cargo.toml
Cargo.toml
This file has not been changed.
sachy-fnv/Cargo.toml
sachy-fnv/Cargo.toml
This file has not been changed.
+3
-3
sachy-fnv/src/lib.rs
+3
-3
sachy-fnv/src/lib.rs
···
2
2
//!
3
3
//! ```
4
4
//! use sachy_fnv::fnv32_hash;
5
-
//!
5
+
//!
6
6
//! let hash = fnv32_hash("water_pump_1");
7
7
//!
8
8
//! assert_eq!(hash, 3557162331);
9
9
//! ```
10
10
#![no_std]
11
11
12
-
const FNV_OFFSET_BASIS_32: u32 = 0x811c9dc5;
13
-
const FNV_PRIME_32: u32 = 0x01000193;
12
+
const FNV_OFFSET_BASIS_32: u32 = 0x811c9dc5;
13
+
const FNV_PRIME_32: u32 = 0x01000193;
14
14
15
15
/// `const` FNV32 hasher. Takes a `&str` and returns a `u32` hash.
16
16
pub const fn fnv32_hash(str: &str) -> u32 {
History
5 rounds
0 comments
1 commit
expand
collapse
feat: FNV hasher crate
1/1 success
expand
collapse
expand 0 comments
pull request successfully merged
1 commit
expand
collapse
feat: FNV hasher crate
1/1 success
expand
collapse
expand 0 comments
1 commit
expand
collapse
feat: FNV hasher crate
1/1 success
expand
collapse
expand 0 comments
1 commit
expand
collapse
feat: FNV hasher crate