mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-05 20:30:57 +00:00
Add note on fn main() in doctest
This commit is contained in:
parent
a93798d209
commit
fe15bc1d0b
1 changed files with 2 additions and 0 deletions
|
|
@ -176,6 +176,8 @@ impl Scalar {
|
||||||
/// extern crate sha2;
|
/// extern crate sha2;
|
||||||
/// use sha2::Sha512;
|
/// use sha2::Sha512;
|
||||||
///
|
///
|
||||||
|
/// # // Need fn main() here in comment so the doctest compiles
|
||||||
|
/// # // See https://doc.rust-lang.org/book/documentation.html#documentation-as-tests
|
||||||
/// # fn main() {
|
/// # fn main() {
|
||||||
/// let msg = "To really appreciate architecture, you may even need to commit a murder";
|
/// let msg = "To really appreciate architecture, you may even need to commit a murder";
|
||||||
/// let s = Scalar::hash_from_bytes::<Sha512>(msg.as_bytes());
|
/// let s = Scalar::hash_from_bytes::<Sha512>(msg.as_bytes());
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue