-
Notifications
You must be signed in to change notification settings - Fork 5
Improve documentation and add examples #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| /// which returns a `(u64, u64)` pair for greater precision. | ||
| /// | ||
| /// </div> | ||
| fn finish(&self) -> u64 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does deprecated work on implementations? If so, you could add it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately no,
error: this `#[deprecated]` annotation has no effect
--> src/stable_hasher.rs:118:5
|
118 | #[deprecated = "use StableHasher::finalize instead"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the unnecessary deprecation attribute
|
= note: `#[deny(useless_deprecated)]` on by default
error: could not compile `rustc-stable-hash` (lib) due to 1 previous error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Afaik, the panic is from a time when there was no StableHashResult yet. It should be fine to just return one half of the hash or do something like Fingerprint::combine.
|
#4 was merged, I have rebased this PR over @WaffleLapkin @michaelwoerister any objections? |
|
@Urgau, I left a couple of remarks but nothing blocking. I'm good with merging the PR, looks great! |
This PR improves the documentation of the public methods of
StableHasherand adds some usage examples.cc @weihanglo
r? @WaffleLapkin
Fixes #2