Repo of no-std crates for my personal embedded projects

feat: FNV hasher crate #3

merged opened by sachy.dev targeting main from more-pico-crates
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:usjm3ynnir6y4inkcdovrfei/sh.tangled.repo.pull/3m7zx4hikuz22
+3 -3
Interdiff #0 #1
.tangled/workflows/test.yml

This file has not been changed.

Cargo.lock

This file has not been changed.

Cargo.toml

This file has not been changed.

sachy-fnv/Cargo.toml

This file has not been changed.

+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
sign up or login to add to the discussion
1 commit
expand
feat: FNV hasher crate
1/1 success
expand
expand 0 comments
pull request successfully merged
1 commit
expand
feat: FNV hasher crate
1/1 success
expand
expand 0 comments
1 commit
expand
feat: FNV hasher crate
1/1 success
expand
expand 0 comments
1 commit
expand
feat: FNV hasher crate
1/1 success
expand
expand 0 comments
1 commit
expand
feat: FNV hasher crate
expand 0 comments