-
Notifications
You must be signed in to change notification settings - Fork 265
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
Broken documentation: What on earth is "GenericArray" #563
Comments
Apparently I can do |
It actually seems like a bug in rustdoc. For whatever reason it's not linking to the relevant type, which is: https://docs.rs/generic-array/0.14.7/generic_array/struct.GenericArray.html Note that in the next release we'll be migrating to https://docs.rs/digest/0.11.0-pre.8/digest/type.Output.html I'm not sure why rustdoc is having an issue with this, but perhaps we should file an upstream bug, and in the meantime add manual links to the relevant types. Note that |
This seems like a recent rustdoc regression. I've filed an upstream issue: rust-lang/rust#120983 |
It also seems your types (e.g. Sha256 or Md5) confuses Rust Analyzer enough that I don't get any completion suggestions on them. Could it be related (e.g. your code is too confusing for the tools for some reason). |
That's probably related to RustCrypto/traits#1069 |
It would be incredibly helpful if we could get a |
That wouldn't solve my problem. I don't want to do extra allocations. I want to finalize into a statically sized array on the stack. That would be the ideal solutions for me. |
|
Closing in favor of rust-lang/docs.rs#2528 |
https://docs.rs/sha2/latest/sha2/trait.Digest.html indicates I need to finalise into something called an "GenericArray". Unfortunately I have no idea what that is, as unlike most types this is not actually a link to the type. Usually rustdoc is pretty good about this, so I assume you did something unusual.
Hm, maybe it is some sort of trait. Lets try:
Nope!
Also that is a really strange type. And it seems to confuse rust-analyzer in vscode such that I don't actually get any help for it.
All your examples in the sha2 crate only shows using finalize, not finalize_into. I want a stack allocated array in the end, and I need to compare it to an
[u8; 32]
that I get from elsewhere. It doesn't seem convertible. E.g. this doesn't work either:(Nor does it help adding
actual.into::<[u8; 32]>
).The text was updated successfully, but these errors were encountered: