From 6d23614467e8f51ce7a1b4defdd777f5320f6c4c Mon Sep 17 00:00:00 2001 From: Tobin Harding Date: Thu, 13 Jan 2022 16:53:25 +1100 Subject: [PATCH] Improve lib.rs rustdocs Improve the main docs by doing: - Remove unneeded `self` from use statement - Add code ticks to `bitcoin_hashes` --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 7bda140..c702cd8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -57,13 +57,13 @@ //! Alternately, keys and messages can be parsed from slices, like //! //! ```rust -//! use self::secp256k1::{Secp256k1, Message, SecretKey, PublicKey}; +//! use secp256k1::{Secp256k1, Message, SecretKey, PublicKey}; //! //! let secp = Secp256k1::new(); //! let secret_key = SecretKey::from_slice(&[0xcd; 32]).expect("32 bytes, within curve order"); //! let public_key = PublicKey::from_secret_key(&secp, &secret_key); //! // This is unsafe unless the supplied byte slice is the output of a cryptographic hash function. -//! // See the above example for how to use this library together with bitcoin_hashes. +//! // See the above example for how to use this library together with `bitcoin_hashes`. //! let message = Message::from_slice(&[0xab; 32]).expect("32 bytes"); //! //! let sig = secp.sign_ecdsa(&message, &secret_key);