Merge rust-bitcoin/rust-bitcoin#766: wrap u8 and LeafVersion in backticks and square bracket in doc

9835736ef5 wrap u8 and LeafVersion in backticks and square bracket in doc (KaFai Choi)

Pull request description:

  Found this minor doc issue while reviewing(learning) previous merged PR.

  Close https://github.com/rust-bitcoin/rust-bitcoin/issues/763

ACKs for top commit:
  Kixunil:
    ACK 9835736ef5
  dr-orlovsky:
    ACK 9835736ef5

Tree-SHA512: 3cdeb88a5a13c26e345552038a80c34c68ec581de5739ec3545643c4900c46cee4636a5cf84f5d1b4c8652a032dc2e4a66fe60fa9cbebc3adfef4b8886c7730c
This commit is contained in:
Dr. Maxim Orlovsky 2022-01-10 11:42:55 +02:00
commit b91058c50c
No known key found for this signature in database
GPG Key ID: AF91255DEA466640
2 changed files with 2 additions and 2 deletions

View File

@ -276,7 +276,7 @@ impl SchnorrSigHashType {
} }
} }
/// Create a [`SchnorrSigHashType`] from raw u8 /// Create a [`SchnorrSigHashType`] from raw `u8`
pub fn from_u8(hash_ty: u8) -> Result<Self, Error> { pub fn from_u8(hash_ty: u8) -> Result<Self, Error> {
match hash_ty { match hash_ty {
0x00 => Ok(SchnorrSigHashType::Default), 0x00 => Ok(SchnorrSigHashType::Default),

View File

@ -762,7 +762,7 @@ impl ControlBlock {
/// Inner type representing future (non-tapscript) leaf versions. See [`LeafVersion::Future`]. /// Inner type representing future (non-tapscript) leaf versions. See [`LeafVersion::Future`].
/// ///
/// NB: NO PUBLIC CONSTRUCTOR! /// NB: NO PUBLIC CONSTRUCTOR!
/// The only way to construct this is by converting u8 to LeafVersion and then extracting it. /// The only way to construct this is by converting `u8` to [`LeafVersion`] and then extracting it.
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
pub struct FutureLeafVersion(u8); pub struct FutureLeafVersion(u8);