Improve lib.rs rustdocs
Improve the main docs by doing: - Remove unneeded `self` from use statement - Add code ticks to `bitcoin_hashes`
This commit is contained in:
parent
4c4268f1ad
commit
6d23614467
|
@ -57,13 +57,13 @@
|
||||||
//! Alternately, keys and messages can be parsed from slices, like
|
//! Alternately, keys and messages can be parsed from slices, like
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use self::secp256k1::{Secp256k1, Message, SecretKey, PublicKey};
|
//! use secp256k1::{Secp256k1, Message, SecretKey, PublicKey};
|
||||||
//!
|
//!
|
||||||
//! let secp = Secp256k1::new();
|
//! let secp = Secp256k1::new();
|
||||||
//! let secret_key = SecretKey::from_slice(&[0xcd; 32]).expect("32 bytes, within curve order");
|
//! let secret_key = SecretKey::from_slice(&[0xcd; 32]).expect("32 bytes, within curve order");
|
||||||
//! let public_key = PublicKey::from_secret_key(&secp, &secret_key);
|
//! 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.
|
//! // 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 message = Message::from_slice(&[0xab; 32]).expect("32 bytes");
|
||||||
//!
|
//!
|
||||||
//! let sig = secp.sign_ecdsa(&message, &secret_key);
|
//! let sig = secp.sign_ecdsa(&message, &secret_key);
|
||||||
|
|
Loading…
Reference in New Issue