rust-lang / rustc-stable-hash

A stable hashing algorithm used by rustc: cross-platform, deterministic, not secure
Apache License 2.0
5 stars 3 forks source link

Document public items #2

Closed weihanglo closed 3 months ago

weihanglo commented 3 months ago

It would be great if these public items are documented, especially for the tuple finalized() returning.

https://github.com/rust-lang/rustc-stable-hash/blob/cb8e141b08fb839606a5f79f9b56087cd54b764d/src/stable_hasher.rs#L33-L50

The implementation of Hash::finish should also be documented, with the reason why it can't be used.

https://github.com/rust-lang/rustc-stable-hash/blob/cb8e141b08fb839606a5f79f9b56087cd54b764d/src/stable_hasher.rs#L52-L55

Would be great if we can provide a reference implementation of StableHasherResult trait, or link to the implementation of Hash64/Hash128 in rust-lang/rust.

https://github.com/rust-lang/rustc-stable-hash/blob/cb8e141b08fb839606a5f79f9b56087cd54b764d/src/stable_hasher.rs#L11-L14