Sample code: sha1 - Rust
I am trying sha1 = "0.10.0"
- rustc can not find sha1::Sha1::new()
- IntelliJ can't find sha1::Sha1::new() either
- I can't seem to find additional feature flags to add
How do I fix this ?
Sample code: sha1 - Rust
I am trying sha1 = "0.10.0"
How do I fix this ?
Does Sha1::default()
work? (Just a guess from clicking through.)
Ah, this is my fault. I failed to use sha1::Digest
, as the sample code does.
Note that sha-1
got renamed to sha1
, so you should prefer the latter. sha-1
will be fully deprecated on the next breaking release.
@newpavlov : Thanks. I was not aware of this issue. To be pedantic, are the two following statements correct ?
sha1 = "0.10.0"
is actually the correct dependency right ?
my mistake here is that I linked to the documentation of crate sha-1 instead of sha1 ?
Both versions are currently "correct", but sha-1
will be eventually deprecated in favor of sha1
.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.