From fe15bc1d0b676f3b3d3ae21d2a41edcf1fc6276d Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Mon, 27 Feb 2017 11:22:07 -0800 Subject: [PATCH] Add note on fn main() in doctest --- src/scalar.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scalar.rs b/src/scalar.rs index db19a9e..60d92ba 100644 --- a/src/scalar.rs +++ b/src/scalar.rs @@ -176,6 +176,8 @@ impl Scalar { /// extern crate sha2; /// 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() { /// let msg = "To really appreciate architecture, you may even need to commit a murder"; /// let s = Scalar::hash_from_bytes::(msg.as_bytes());