Skip to content

chore: improve rustc-hash maintenance path#74

Closed
vip892766gma wants to merge 1 commit into
rust-lang:masterfrom
vip892766gma:maint/20260525170743
Closed

chore: improve rustc-hash maintenance path#74
vip892766gma wants to merge 1 commit into
rust-lang:masterfrom
vip892766gma:maint/20260525170743

Conversation

@vip892766gma
Copy link
Copy Markdown

Summary:

  • Add unit tests covering edge cases of FxHasher: hashing of empty byte slices, single-byte inputs, mixed write_u8/write_u32/write_u64 sequences producing distinct hashes from write(&[..]), and verifying FxBuildHasher::default() and FxHashMap basic insert/get round-trip. Also add a small doctest or #[test] asserting that hashing the same bytes via different write_* paths is deterministic across calls.
  • Keep the change narrow so it is straightforward to review.

Notes:

  • I kept this scoped to the relevant implementation and tests.

@bjorn3
Copy link
Copy Markdown
Member

bjorn3 commented May 26, 2026

Some of these tests are for properties that are handled by the standard library rather than rustc-hashes, some other tests can't actually fail unless you intentionally try to cause them to fail when making. None of them seem actually useful to me.

@apiraino
Copy link
Copy Markdown

this user has been suspended, rust-lang/rust#156958 (comment)

@apiraino apiraino closed this May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants